Advertisement
Oblivion_UFF

Untitled

Feb 12th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. CMD:duel(playerid, params[])
  2. {
  3.  
  4. new tmp[128],
  5. string[128],
  6. idx =0,
  7. id,
  8. ;
  9. tmp = otherplayerids(params, idx);
  10. id = strval(tmp);
  11. if(InvitedDuel[playerid] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Have you invited someone, wait Expire Invitation");
  12. if(UsingArena == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : At the time the Arena is Being Used");
  13. if(!strlen(tmp)) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You must enter the ID of the player following the Way (/duel [playerid])");
  14. if(id == playerid) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You can not invite the Self");
  15. if(InvitedDuel[id] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Currently the player is in a Duel, wait..");
  16. new name[MAX_PLAYER_NAME];
  17. GetPlayerName(playerid, name, sizeof(name));
  18. format(string, sizeof(string), "»»[DUEL]«« : %s This inviting you to a \n Duel Runing (Press Accept to Accept Duel)",name);
  19. ShowPlayerDialog(id,DIALOG_DUEL,DIALOG_STYLE_MSGBOX,"»»[DUEL]«« :",string,"Accept", "No");
  20. GameTextForPlayer(id,"~r~DUE~w~LO !", 2500, 3);
  21. InvitedDuel[id] = true;
  22. IdDuel[id] = playerid;
  23. SetTimerEx("ExpireDuel",15000,false,"ii",id,playerid);
  24.  
  25. return 1;
  26. }
  27.  
  28. CMD:duel(playerid, params[])
  29. {
  30. new string[128]
  31. tmp = INVALID_PLAYER_ID;
  32. ;
  33.  
  34.  
  35. if(InvitedDuel[playerid] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Have you invited someone, wait Expire Invitation");
  36. if(UsingArena == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : At the time the Arena is Being Used");
  37.  
  38. if(sscanf(params, "u", tmp)) return SendClientMessage(playerid, 0xF41917AA, "/duel <playerid/name>");
  39.  
  40. if(tmp == INVALID_PLAYER_ID) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Invalid player!");
  41.  
  42. if(tmp == playerid) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You can not invite the Self");
  43.  
  44. if(InvitedDuel[tmp] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Currently the player is in a Duel, wait..");
  45. new name[MAX_PLAYER_NAME];
  46. GetPlayerName(playerid, name, sizeof(name));
  47. format(string, sizeof(string), "»»[DUEL]«« : %s This inviting you to a \n Duel Runing (Press Accept to Accept Duel)",name);
  48. ShowPlayerDialog(tmp,DIALOG_DUEL,DIALOG_STYLE_MSGBOX,"»»[DUEL]«« :",string,"Accept", "No");
  49. GameTextForPlayer(tmp,"~r~DUE~w~LO !", 2500, 3);
  50. InvitedDuel[tmp] = true;
  51. IdDuel[tmp] = playerid;
  52. SetTimerEx("ExpireDuel",15000,false,"ii",tmp,playerid);
  53.  
  54. return 1;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement