05.06.2014, 09:42
Quote:
i want to make a function that at specific time if the player is in anyother virtual world except 0 then he will be set to 0
|
The First Line is a basic for() loop.
new i = 0; // Creates the variable 'i' and sets it to 0
i < MAX_PLAYERS; // If the loop is less than MAX_PLAYERS (X amount of slots on a server) it will continue
i++ // Adds one to i each time
For more info - https://sampwiki.blast.hk/wiki/Loops
SetPlayerVirtualWorld(i, 0) Sets all the players' virtual world to 0 even if the player is in virtual world 0; which will not affect that player in any manner, but just set the other players' vworld (who are in a virutal world besides 0) to 0.
Your Welcome.