Virtual Worlds help
#5

Quote:
Originally Posted by saikumar
Посмотреть сообщение
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
If you wanna set everybody's virtual world to 0, why do you even want /getallplayersvirtualworld? The code i posted above simply sets all the players' virtual world to 0 when you type /vworld0forall.





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


Messages In This Thread
Virtual Worlds help - by saikumar - 05.06.2014, 09:21
Re: Virtual Worlds help - by Adityz - 05.06.2014, 09:30
Re: Virtual Worlds help - by saikumar - 05.06.2014, 09:34
Re: Virtual Worlds help - by saikumar - 05.06.2014, 09:39
Re: Virtual Worlds help - by Adityz - 05.06.2014, 09:42
Re: Virtual Worlds help - by saikumar - 05.06.2014, 09:46
Re: Virtual Worlds help - by saikumar - 05.06.2014, 09:50

Forum Jump:


Users browsing this thread: 1 Guest(s)