Game crashes for client on 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)
+--- Thread: Game crashes for client on OnPlayerSpawn (
/showthread.php?tid=319611)
Game crashes for client on OnPlayerSpawn -
Shetch - 19.02.2012
So i have a SetSpawnInfo in my script, but when the player spawns, the hame crashes??
Here's the part that spawns the player.
Код:
if(Player[playerid][Sex] == 1)
{
SetSpawnInfo(playerid, 0, 0, -127.0004,1280.9104,19.7754,182.7446,0,0,0,0,0,0);
SpawnPlayer(playerid);
Player[playerid][Skin] = 26;
Player[playerid][Health] = 100;
SetPlayerPos(playerid,-127.0004,1280.9104,19.7754);
GivePlayerMoney(playerid, 3000);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, Player[playerid][Health]);
Player[playerid][Registred] = true;
Player[playerid][Logged] = true;
Player[playerid][Spawned] = true;
SendClientMessage(playerid, COLOR_GREEN, "INFO: Your character is now created, start your life in Fort Carson.");
}
Here's the OnPlayerSpawn:
Код:
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, Player[playerid][Skin]);
return 1;
}
Can anyone please help?
Re: Game crashes for client on OnPlayerSpawn -
aRoach - 19.02.2012
Do you have mods or something ?
Re: Game crashes for client on OnPlayerSpawn -
Shetch - 19.02.2012
No mods, no nothing.
There's something wrong with the script i guess.
I had a friend trying to connect, and he crashed aswell.
Re: Game crashes for client on OnPlayerSpawn -
Universal - 19.02.2012
I dont know, but usually wrong skin ids cause crashing. Try to check again with the skins and stuff, because I see you got
pawn Код:
SetPlayerSkin(playerid, Player[playerid][Skin]);
there aswell. Try commenting that line and see if it works without it.
Re: Game crashes for client on OnPlayerSpawn -
Shetch - 19.02.2012
Quote:
Originally Posted by Universal
I dont know, but usually wrong skin ids cause crashing. Try to check again with the skins and stuff, because I see you got
pawn Код:
SetPlayerSkin(playerid, Player[playerid][Skin]);
there aswell. Try commenting that line and see if it works without it.
|
The game still crashes... :/
Re: Game crashes for client on OnPlayerSpawn -
Shetch - 19.02.2012
Anyone, any other ideas?