WG40[playerid] = 1; For everyone not only 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: WG40[playerid] = 1; For everyone not only playerid? (
/showthread.php?tid=115223)
WG40[playerid] = 1; For everyone not only playerid? -
pawelf94 - 23.12.2009
WG40[playerid] = 1;
How can i make this for everyone on the server not just the person that types the command
Re: WG40[playerid] = 1; For everyone not only playerid? -
CracK - 23.12.2009
pawn Code:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) WG40[i] = 1;
}
Re: WG40[playerid] = 1; For everyone not only playerid? -
pawelf94 - 23.12.2009
i used this:
Code:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(playerid)) WG40[playerid] = 1, P30[playerid] = 1;
}
and it still does it for playerid not everyone :/
Re: WG40[playerid] = 1; For everyone not only playerid? -
MadeMan - 23.12.2009
pawn Code:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && i != playerid) WG40[i] = 1;
}
Re: WG40[playerid] = 1; For everyone not only playerid? -
Dark_Kostas - 23.12.2009
you need to replace every "playerid" with "i"
pawn Code:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(playerid)) WG40[playerid] = 1, P30[playerid] = 1;
}
to
pawn Code:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) WG40[i] = 1, P30[i] = 1;
}
And use for pawn scripting.