12.11.2010, 06:41
pawn Код:
new moneyid[MAX_PLAYERS];
new id;
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, playername, MAX_PLAYER_NAME);
format(string, sizeof string,"%s%d %s\n",string,i,playername);
moneyid[id] = i;
id += 1;
}
}
ShowPlayerDialog(playerid, LIST, DIALOG_STYLE_LIST,"PlayersLIST",string, "ok", "Cancel");
if(dialogid == LIST)
{
if(response)
{
giveplayerid = moneyid[listitem];
GivePlayerMoney(giveplayerid,1000);
}
else
{
}
return 1;
}