19.02.2012, 17:28
So i have a SetSpawnInfo in my script, but when the player spawns, the hame crashes??
Here's the part that spawns the player.
Here's the OnPlayerSpawn:
Can anyone please help?
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."); }
Код:
public OnPlayerSpawn(playerid) { SetPlayerSkin(playerid, Player[playerid][Skin]); return 1; }