• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] help convert zcmd and sscanf
#2
PHP Code:
CMD:duel(playerid, params[]) { ? ? ? ? new string[128], 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, "r", id)) return SendClientMessage(playerid,0xF41917AA,"??[DUEL]?? : You must enter the ID of the player following the Way (/duel [playerid])"); ? ? ? ? if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xF41917AA,"??[DUEL]?? : This player not connected."); ? ? ? ? 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; }
  Reply


Messages In This Thread
help convert zcmd and sscanf - by nbx2000 - 2021-03-12, 04:56 AM
RE: help convert zcmd and sscanf - by Radical - 2021-03-12, 08:42 AM