Game crashes for client on OnPlayerSpawn
#1

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?
Reply
#2

Do you have mods or something ?
Reply
#3

No mods, no nothing.
There's something wrong with the script i guess.
I had a friend trying to connect, and he crashed aswell.
Reply
#4

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.
Reply
#5

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... :/
Reply
#6

Anyone, any other ideas?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)