SA-MP Forums Archive
noobish...what is called directly after OnPlayerConnect? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: noobish...what is called directly after OnPlayerConnect? (/showthread.php?tid=34205)



noobish...what is called directly after OnPlayerConnect? - kaisersouse - 13.04.2008

Having a problem where players are crashing right after onplayerconnect finishes. Trying to figure out what is called (by default) after that.

Thanks!


Re: noobish...what is called directly after OnPlayerConnect? - weedarr - 13.04.2008

public OnPlayerRequestClass(playerid, classid)

I think thats it.

WeeDarr


Re: noobish...what is called directly after OnPlayerConnect? - Sandra18[NL] - 13.04.2008

Quote:
Originally Posted by [P7
WeeDarr ]
public OnPlayerRequestClass(playerid, classid)

I think thats it.

WeeDarr
Confirmed
I tested it


Re: noobish...what is called directly after OnPlayerConnect? - kaisersouse - 13.04.2008

hmm thats what i thought (thanks for testing for me)

whats odd is onplayerconnect gets all the way through ok, but onplayerrequestclass is NEVER called before the crash. Hmmm...

thanks..gives me a place to dig around


Re: noobish...what is called directly after OnPlayerConnect? - afei - 03.05.2009

I know this is a very old topic but yesterday the same problem appeared in my gamemode. Everybody who tries to connect to my server crashes. I debugged my script and the result was the same as kaisersouse explained in his post above. I couldnt find the applicable reason for this problem after reading, debugging and re-reading yet; I came across this, so i wanted to ask if the crash reason is in the meantime known ?.


Re: noobish...what is called directly after OnPlayerConnect? - lavamike - 03.05.2009

OnPlayerRequestClass(playerid, classid);

is called when someone trys to spawn. I use it to check if they are registered/logged in or not and say if they arn't logged in, it will tell them to login and return 0;

return 0; means their request to spawn has been disallowed.


Re: noobish...what is called directly after OnPlayerConnect? - afei - 03.05.2009

Quote:
Originally Posted by Lavamike
OnPlayerRequestClass(playerid, classid);

is called when someone trys to spawn. I use it to check if they are registered/logged in or not and say if they arn't logged in, it will tell them to login and return 0;

return 0; means their request to spawn has been disallowed.
Yea i know what its used for. But i get no clue why everybody crashes after OnPlayerConnect is finished and before OnPlayerRequestClass gets called.