Quote:
Originally Posted by Nero_3D
Or you format it into the dialog
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source) { if(IsPlayerAdmin(playerid) { new tmp[64] ; format(tmp, sizeof tmp, "Kick %d\nBan %d\nMute %d", clickedplayerid, clickedplayerid, clickedplayerid); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Dialog Admin by PhantomCraft", tmp, "Confirm", "Cancel"); } return true; }
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 1: { if(response) { switch(listitem) { case 0: Kick(strval(inputtext[5])); case 1: Ban(strval(inputtext[4])); case 2: Mute(strval(inputtext[5])); } } } } return true; }
|
what about if playerid is more than 1 chars or 2 chars?