02.11.2012, 18:28
pawn Код:
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 35:// Our dialog! I made it this number , so it don't mess with other dialogs in your gamemode!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
new pname[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s gone AFK!", pname);
SendClientMessageToAll(pink, string);
TogglePlayerControllable(playerid, 0);
}
case 1: // The second item listed
{
new pname[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s came Back from AFK!", pname);
SendClientMessageToAll(pink, string);
TogglePlayerControllable(playerid, 1);
}
}
}
}
}
return 1;
}