get Players - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: get Players (
/showthread.php?tid=189508)
help get Players -
435076378 - 12.11.2010
pawn Код:
. 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);
}
}
ShowPlayerDialog(playerid, LIST, DIALOG_STYLE_LIST,"PlayersLIST",string, "ok", "Cancel");
if(dialogid == LIST)
{
if(response)
{
giveplayerid = ??????;
GivePlayerMoney(giveplayerid,1000);
}
else
{
}
return 1;
}
Re: help get Players -
Kidemo - 12.11.2010
Why you posted this?
Does this not work in your server or do you get errors
Re: get Players -
Rafa - 12.11.2010
lol what is the errors here
o_0
Re: help get Players -
gr56 - 12.11.2010
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;
}