02.09.2016, 04:55
if i want to make dialog with : OnPlayerClickPlayer
its a DIALOG_STYLE_LIST
then on DialogRespond
what should be clickedplayerid
its a DIALOG_STYLE_LIST
then on DialogRespond
what should be clickedplayerid
PHP код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(pInfo[playerd][Adminlevel] || IsPlayerAdmin[playerid]) return 1;
ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Action","Kick /n Ban","Ok","Close");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Click) //response for the showplayerdialog
{
if(response)
{
switch(listitem)
{
case 0://Kick
{
Kick(clickedplayerid); //How to make this??
}
case 1: //Ban
{
Ban(clickedplayerid); //And this....
}
}
}
return 1;
}
return 0;
}