Stop code from loading if...
#1

Hello.

Код:
public OnPlayerSpawn(playerid)
{
	if(test1[playerid]==0)
	{
	new Float:xx, Float:yy, Float:zz;
	SetPlayerCameraPos(playerid, xx, yy, zz);
	}
	if (lllll[playerid]==1)
  	{
		  SetPlayer...blablabla
So, how to do this:
If test == 0 -> it does those things, BUT it stops the code from going any further in OnPlayerSpawn, until next time. But also, if the test == 1, it just "jumps" over it without stopping the code and doing the stuff in there. Maybe it has something to do with returning false...?

Regards,
Assyria
Reply
#2

https://sampwiki.blast.hk/wiki/Keywords:Statements#return
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)