clickedplayerid
#7

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?
Reply


Messages In This Thread
clickedplayerid - by NicholasA - 06.04.2013, 13:23
Re: clickedplayerid - by iJumbo - 06.04.2013, 13:24
Re: clickedplayerid - by NicholasA - 06.04.2013, 13:26
Re: clickedplayerid - by doreto - 06.04.2013, 13:29
Re: clickedplayerid - by iJumbo - 06.04.2013, 13:29
AW: clickedplayerid - by Nero_3D - 06.04.2013, 14:18
Re: AW: clickedplayerid - by iJumbo - 06.04.2013, 14:22
AW: Re: AW: clickedplayerid - by Nero_3D - 06.04.2013, 14:24

Forum Jump:


Users browsing this thread: 1 Guest(s)