SA-MP Forums Archive
Crashing while spawning - 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)
+--- Thread: Crashing while spawning (/showthread.php?tid=521002)



Crashing while spawning - Yera96 - 21.06.2014

It has been a long time already I'm trying to fix this issue but can't do anything. Players frequently getting crashed while spawning, and I'm also. Plus, admins are crashing after spectating player. Some people told me it's related to objects. But I removed all objects and tested but still crashing. And someone told me SetPlayerSkin in OnPlayerSpawn can crash a player. Is that true? And how to fix this? Please help.

Thanks!


Re: Crashing while spawning - Cena44 - 21.06.2014

Try SetSpawnInfo, it will help decrease crashes related to skin issues.


Re: Crashing while spawning - Yera96 - 21.06.2014

Can you give an example where to put it?


Re: Crashing while spawning - bare380 - 21.06.2014

https://sampwiki.blast.hk/wiki/SetSpawnInfo


Re: Crashing while spawning - Yera96 - 21.06.2014

Well, I added this to OnPlayerRequestClass.

But now I have one problem. Say I have a variable which stores player's skin.

PHP Code:
new gSkin[MAX_PLAYERS]; 
PHP Code:
public OnPlayerRequestClass(playeridclassid)
{
     
gSkin[playerid] = GetPlayerSkin(playerid);
     
SetSpawnInfo(playeridNO_TEAMgSkin[playerid], 0000.0000000);
     return 
1;

PHP Code:
CMD:myskin(playeridparams[])
{
     if(
sscanf(params,"d",params[0]) || params[0] < || params[0] == 74 || params[0] > 299) return SendClientMessage(playerid, -1"Use: /skin [1-299]");
     
gSkin[playerid] = params[0];
     return 
SetPlayerSkin(playeridparams[0]);

But I have GangWar system, and when a player spawns to special zone (/cw) his skin should be changed. I did /skin 24 (e.g). After respawning to normal zone (/cwoff) it gives me the skin which I chose in RequestClass. Please help me to solve this. Sorry for my bad english.


Re: Crashing while spawning - Yera96 - 22.06.2014

Bumb, anyone?


Re : Crashing while spawning - Clad - 22.06.2014

The coordiantes may make the player gets crashed on spawn as well


Re: Crashing while spawning - Yera96 - 22.06.2014

what do you mean? any example?


Re: Crashing while spawning - Clad - 22.06.2014

If the coordinates are kinda impossible, It may make him crash


Re: Crashing while spawning - Yera96 - 22.06.2014

"kinda impossible" = something like 9999.99, 9999.99, 9999.99? I'm sure my coordinates aren't like this.