Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:duel(playerid, params[])
- {
- new tmp[128],
- string[128],
- idx =0,
- id,
- ;
- tmp = otherplayerids(params, idx);
- id = strval(tmp);
- if(InvitedDuel[playerid] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Have you invited someone, wait Expire Invitation");
- if(UsingArena == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : At the time the Arena is Being Used");
- if(!strlen(tmp)) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You must enter the ID of the player following the Way (/duel [playerid])");
- if(id == playerid) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You can not invite the Self");
- if(InvitedDuel[id] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Currently the player is in a Duel, wait..");
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "»»[DUEL]«« : %s This inviting you to a \n Duel Runing (Press Accept to Accept Duel)",name);
- ShowPlayerDialog(id,DIALOG_DUEL,DIALOG_STYLE_MSGBOX,"»»[DUEL]«« :",string,"Accept", "No");
- GameTextForPlayer(id,"~r~DUE~w~LO !", 2500, 3);
- InvitedDuel[id] = true;
- IdDuel[id] = playerid;
- SetTimerEx("ExpireDuel",15000,false,"ii",id,playerid);
- return 1;
- }
- CMD:duel(playerid, params[])
- {
- new string[128]
- tmp = INVALID_PLAYER_ID;
- ;
- if(InvitedDuel[playerid] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Have you invited someone, wait Expire Invitation");
- if(UsingArena == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : At the time the Arena is Being Used");
- if(sscanf(params, "u", tmp)) return SendClientMessage(playerid, 0xF41917AA, "/duel <playerid/name>");
- if(tmp == INVALID_PLAYER_ID) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Invalid player!");
- if(tmp == playerid) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You can not invite the Self");
- if(InvitedDuel[tmp] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Currently the player is in a Duel, wait..");
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "»»[DUEL]«« : %s This inviting you to a \n Duel Runing (Press Accept to Accept Duel)",name);
- ShowPlayerDialog(tmp,DIALOG_DUEL,DIALOG_STYLE_MSGBOX,"»»[DUEL]«« :",string,"Accept", "No");
- GameTextForPlayer(tmp,"~r~DUE~w~LO !", 2500, 3);
- InvitedDuel[tmp] = true;
- IdDuel[tmp] = playerid;
- SetTimerEx("ExpireDuel",15000,false,"ii",tmp,playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement