if(dialogid == 741) { if(response) { if(listitem == 0) { SetPlayerPos(playerid,-1984.4254,137.7499,27.6875); GameTextForPlayer(playerid, "~y~San Fierro (SF)", 4000, 5); } else if(listitem == 1) { SetPlayerPos(playerid,1479.2385,-1672.3132,14.0469); GameTextForPlayer(playerid, "~y~Los Santos (LS)", 4000, 5); } else if(listitem == 2) { SetPlayerPos(playerid,2026.7106,1342.5176,10.8203); GameTextForPlayer(playerid, "~y~Las Venturas (LV)", 4000, 5); } } }
for (new i = 0, j = GetPlayerPoolSize (); i <= j; i++)
new pName [MAX_PLAYER_NAME];
GetPlayerName (playerid, pName, MAX_PLAYER_NAME);
if(dialogid == 741)
{
if(response)
{
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(listitem == 0)
{
SetPlayerPos(playerid,-1984.4254,137.7499,27.6875);
GameTextForPlayer(playerid, "~y~San Fierro (SF)", 4000, 5);
format(string, sizeof(string), "%s have gone to San Fierro", name);
SendClientMessageToAll(-1, string);
}
else if(listitem == 1)
{
SetPlayerPos(playerid,1479.2385,-1672.3132,14.0469);
GameTextForPlayer(playerid, "~y~Los Santos (LS)", 4000, 5);
format(string, sizeof(string), "%s have gone to Los Santos", name);
SendClientMessageToAll(-1, string);
}
else if(listitem == 2)
{
SetPlayerPos(playerid,2026.7106,1342.5176,10.8203);
GameTextForPlayer(playerid, "~y~Las Venturas (LV)", 4000, 5);
format(string, sizeof(string), "%s have gone to Las Venturas", name);
SendClientMessageToAll(-1, string);
}
}
}
You will have to loop through all the players with:
PHP код:
To get a pplayer's name: PHP код:
|
switch(listitem)
{
case 0:
{
}
case 1:
{
}
case 2:
{
}
}