OnPlayerSpawn vs. OnPlayerRequestSpawn
#3

I really appreciate all of your help! One more question...

I have a custom function OnPlayerLogin...

It is called once someone logs into their account. Then it distributes all of their account variables from my MYSQL database to their PVars.

ie:

public OnPlayerLogin(playerid)
{

**all of the Pvars being set and database stuff**

if(GetPVarInt(playerid, "banned") == 1)
{
System_Ban(playerid, "Account Banned");
return 1;
}
if(GetPVarInt(playerid, "locked") == 1)
{
System_Kick(playerid, "Character Locked");
return 1;
}

**set additional pvar's and stuff***

return 1;

}


Q: Will the bolded return 1's end the function (assuming the player is locked or banned) and not continue setting the additional pvars beneath it?

Q: Hopefully it does, but should it be return 1 or return 0? Does it matter?
Reply


Messages In This Thread
OnPlayerSpawn vs. OnPlayerRequestSpawn - by cAMo - 15.05.2010, 15:02
Re: OnPlayerSpawn vs. OnPlayerRequestSpawn - by juice.j - 15.05.2010, 15:06
Re: OnPlayerSpawn vs. OnPlayerRequestSpawn - by cAMo - 15.05.2010, 15:24
Re: OnPlayerSpawn vs. OnPlayerRequestSpawn - by juice.j - 15.05.2010, 15:37

Forum Jump:


Users browsing this thread: 2 Guest(s)