SA-MP Forums Archive
Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP DL Edition (https://sampforum.blast.hk/forumdisplay.php?fid=92)
+--- Forum: SA-MP 0.3.DL (https://sampforum.blast.hk/forumdisplay.php?fid=90)
+--- Thread: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame (/showthread.php?tid=644908)



- Saddin - 16.11.2017

I have few problems.

First problem is when I spawn vehicle (sometimes it works) I get warning and I can't spawn vehicle.



Second problem is that some functions won't call OnPlayerSpawn.

Another problem is that I spawn with CJ skin (obviously some functions are not calling as I said in previous sentence). The skin that I should get is a custom model.


All of this problem started from 0.3.8 R2

Anybody else have problem with OnPlayerSpawn?


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - m4karow - 18.11.2017

you have to use setplayerskin to get the custom model instead of setplayerspawninfo etc


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - Saddin - 18.11.2017

Quote:
Originally Posted by m4karow
View Post
you have to use setplayerskin to get the custom model instead of setplayerspawninfo etc
It's not just SetPlayerSkin/SetPlayerSpawnInfo problem, 20 other lines under onplayerspawn won't work with new version. OnPlayerSpawn isn't called.


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - ZaikerH - 18.11.2017

I have a similar problem, and I think they are badly added collisions of an object.


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - Saddin - 18.11.2017

Quote:
Originally Posted by ZaikerH
View Post
I have a similar problem, and I think they are badly added collisions of an object.
I don't have any custom models added.


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - Saddin - 19.11.2017

Someone?


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - Beryllium - 22.11.2017

Could you please provide the "OnPlayerSpawn" codes?


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - beckzy - 24.11.2017

I think the problem is AddPlayerClass doesn't work with the new skin IDs (20000-29999) . If you try to spawn with a skin added with AddPlayerClass, and using one of the new IDs, OnPlayerSpawn won't be called. That's just what I'm guessing though?


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - Saddin - 24.11.2017

Quote:
Originally Posted by BeckzyBoi
View Post
I think the problem is AddPlayerClass doesn't work with the new skin IDs (20000-29999) . If you try to spawn with a skin added with AddPlayerClass, and using one of the new IDs, OnPlayerSpawn won't be called. That's just what I'm guessing though?
That fixed the problem. Thanks!

Is it smart to call setplayerskin function under onplayerspawn or?


Re: Some functions won't work OnPlayerSpawn, spawning with CJ skin, warning when creating vehicle ingame - beckzy - 24.11.2017

Quote:
Originally Posted by Saddin
View Post
That fixed the problem. Thanks!

Is it smart to call setplayerskin function under onplayerspawn or?
I've got no idea tbf, you can only try.