Why OnPlayerSpawn ... - 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: Why OnPlayerSpawn ... (
/showthread.php?tid=92967)
Why OnPlayerSpawn ... -
UsaBoy91 - 22.08.2009
Don't work in Filterscript ? Because i use it in Gamemode ?
Re: Why OnPlayerSpawn ... -
dice7 - 22.08.2009
It does work in filterscripts
Re: Why OnPlayerSpawn ... -
UsaBoy91 - 22.08.2009
No , it isn't ...
Re: Why OnPlayerSpawn ... -
Doppeyy - 22.08.2009
Yes it does :S if it doesnt then you did something wrong.
/Artix
Re: Why OnPlayerSpawn ... -
snoob - 22.08.2009
be sure that in all your
other filterscript or your gamemode you
dont return 0; or not returning anything...
basicly open all your loaded filterscript and
be sure you return 1; in all the onplayerspawn
Re: Why OnPlayerSpawn ... -
UsaBoy91 - 22.08.2009
Quote:
Originally Posted by snoob
be sure that in all your other filterscript or your gamemode you dont return 0; or not returning anything...
basicly open all your loaded filterscript and be sure you return 1; in all the onplayerspawn
|
lol , thanks , it worked
Re: Why OnPlayerSpawn ... -
UsaBoy91 - 22.08.2009
But , can somebady tell me why i really need to 'return true' at final of a callback?
Re: Why OnPlayerSpawn ... -
ronyx69 - 22.08.2009
Quote:
Originally Posted by Angel φ
But , can somebady tell me why i really need to 'return true' at final of a callback?
|
Because the callbacks are firstly called in gamemode ... and then in filterscripts. But if you "return false", it does not continue - does not call the callbacks in filterscripts.
Re: Why OnPlayerSpawn ... -
UsaBoy91 - 22.08.2009
so , if i don't return anything at the end of a callback in a filterscript , it automatcly
return 0; ?
Re: Why OnPlayerSpawn ... -
snoob - 22.08.2009
Quote:
Originally Posted by Angel φ
But , can somebady tell me why i really need to 'return true' at final of a callback?
|
returning a value is the name of the game...
when you return 0; at a callback it usuly stop the execution
like if you return 0 at onplayerrequestspawn it will not spawn