Undefines Symbol "Playerid" - 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: Undefines Symbol "Playerid" (
/showthread.php?tid=154206)
Undefines Symbol "Playerid" -
Ihsan_Cingisiz - 12.06.2010
Hello, i made a Payday system but i can't make playerid's
i need something with for(new i=.... Bla bla bla.. But i don't
know how to make it, i didn't find anything with the search
button.
Re: Undefines Symbol "Playerid" -
MastahServers - 12.06.2010
pawn Код:
GetPlayerName(playerid, name, sizeof(name));
Re: Undefines Symbol "Playerid" -
Ihsan_Cingisiz - 12.06.2010
Quote:
Originally Posted by MrDeGekkerd
pawn Код:
GetPlayerName(playerid, name, sizeof(name));
|
Nevermind, sorry for this post i made it already..
for(new i=0; i<MAX_PLAYERS; i++)
Re: Undefines Symbol "Playerid" -
Dark_Kostas - 12.06.2010
It is better to use GetMaxPlayers(); Because if you have 20(for example) defined players from server.cfg then there is no need to go till 500(MAX_PLAYERS equals to 500).
pawn Код:
for(new i=0; i<GetMaxPlayers(); i++;)
{
if(IsPlayerConnected(i))
{
//Rest of the payday
}
}
Re: Undefines Symbol "Playerid" -
MastahServers - 12.06.2010
I just found this in my payday script:
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
GivePlayerMoney(i, cash);
}
Change
cash to the strtok you used.
Re: Undefines Symbol "Playerid" -
iJumbo - 12.06.2010
Quote:
Originally Posted by Dark_Kostas
It is better to use GetMaxPlayers(); Because if you have 20(for example) defined players from server.cfg then there is no need to go till 500(MAX_PLAYERS equals to 500).
pawn Код:
for(new i=0; i<GetMaxPlayers(); i++;) { if(IsPlayerConnected(playerid)) { //Rest of the payday } }
here if(IsPlayerConnected(playerid)) or if(IsPlayerConnected(i))  ??
|
Re: Undefines Symbol "Playerid" -
Dark_Kostas - 12.06.2010
Quote:
Originally Posted by [ZDM
jumbo ]
Quote:
Originally Posted by Dark_Kostas
It is better to use GetMaxPlayers(); Because if you have 20(for example) defined players from server.cfg then there is no need to go till 500(MAX_PLAYERS equals to 500).
pawn Код:
for(new i=0; i<GetMaxPlayers(); i++;) { if(IsPlayerConnected(playerid)) { //Rest of the payday } }
here if(IsPlayerConnected(playerid)) or if(IsPlayerConnected(i))  ??
|
|
oops! fixed

yes it should be "i"