WG40[playerid] = 1; For everyone not only playerid?
#1

WG40[playerid] = 1;

How can i make this for everyone on the server not just the person that types the command
Reply
#2

pawn Code:
for(new i; i<MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i)) WG40[i] = 1;
}
Reply
#3

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 :/
Reply
#4

pawn Code:
for(new i; i<MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i) && i != playerid) WG40[i] = 1;
}
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)