Easy question about loops
#1

Day by day i'm getin worst in script... I'm forgetin everything. (I have a problem, so don't 'blame' me).

When do i have to use loops? This question arose because someone said that using the playerid on OnPlayerUpdate would be for all players. The first thing that i said was that is not true because that was going to work just for id 0, but i go into the game and tested it and it worked. O:

Now i'm confused about loops.

Can someone help me? Thanks.
Reply
#2

ah loop is nothing else as a code which repeats itsself x times with an increasing / decreasing variable

And about the publics, the sa-mp server call publics when a event happens, so if the player spawn OnPlayerSpawn is called, its correct that the variable playerid only contains the playerid of the player spawned and all people spawn sometime so OnPlayerSpawn gets called indireclty for all players
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)