Quote:
Originally Posted by bleedis
Sorry for double post, didnt work. It was the same, removed all spikes but that thing staid. Maybe i have to better explain. If someone uses spike command it makes this to go to 1 if someone already placed spikes then this happens -
pawn Код:
if (spikes[playerid] == 1) return SendClientMessage(playerid, 0xE01B4CFF, "{ff0000}** {C8D1CC}You already placed spikes!");
So if admin uses command to remove all players spikes on server, then how to get that spikes[playerid] = 1; goes to spikes[playerid] = 0; for everyone?
|
Well instead of setting
spikes[playerid] = 0 you would need to do what the guy above said.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
So when you use the command to set the spikes to 0 for all players. Instead of doing spikes[playerid] = 0 you would need to do spikes[i] = 0 . Then instead of just setting that variable to 0 for the player who used the command
[playerid], it would go threw all the online players
[i] and set that variable to 0 for them.
So when the player uses the command to set the spikes, you would do spikes[playerid] = 1 and the admin command to remove ALL spikes would have spikes[i] = 0 in the command with the
for (new.. code before you use the [i].
Did that make any sense?