Crash...
#1

I have some problems... Sometimes when player spawn's 2 - 3 seconds later he crashes...
Is there anything wrong on my OnPlayerSpawn or....
Код:
public OnPlayerSpawn(playerid)
{
	if(pInfo[playerid][LogIned] == 0) SetPlayerSkin(playerid,pInfo[playerid][Skin]);
    pInfo[playerid][LogIned] = 1;
	if(duty[playerid] == 1) SetPlayerColor(playerid,COLOR_YELLOW);
	else SetPlayerColor(playerid,COLOR_WHITE);
	SetPlayerName(playerid,pInfo[playerid][Ime]);
	TogglePlayerControllable(playerid,0);
	SetTimerEx("spawn", 2500, 0, "i", playerid );
    pInfo[playerid][Izpit] = 0;
    SetPlayerScore(playerid, pInfo[playerid][Level]);
    TextDrawHideForPlayer(playerid,Textdraw8);
	Vucen[playerid] = 0;
	if(pInfo[playerid][Death] == 1 && pInfo[playerid][Jail] == 0)
	{
		GivePlayerMoney(playerid, - 100);
		SendClientMessage(playerid, COLOR_RED, "Doktor vas je pozdravil in vam zaračunal 200 $");
		pInfo[playerid][Death] = 0;
		SetPlayerSkin(playerid,pInfo[playerid][Skin]);
	}
    if(IsSpecing[playerid] == 1)
    {
        SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);// Remember earlier we stored the positions in these variables, now we're gonna get them from the variables.
        SetPlayerInterior(playerid,Inter[playerid]);//Setting the player's interior to when they typed '/spec'
        SetPlayerVirtualWorld(playerid,vWorld[playerid]);//Setting the player's virtual world to when they typed '/spec'
        IsSpecing[playerid] = 0;//Just saying you're free to use '/spec' again YAY :D
        IsBeingSpeced[spectatorid[playerid]] = 0;//Just saying that the player who was being spectated, is not free from your stalking >:D
    }
   	TextDrawHideForPlayer(playerid,Textdraw0);
	TextDrawHideForPlayer(playerid,Textdraw1);
	TextDrawHideForPlayer(playerid,Textdraw2);
	TextDrawHideForPlayer(playerid,Textdraw3);
	TextDrawHideForPlayer(playerid,Textdraw4);
	TextDrawHideForPlayer(playerid,Textdraw5);
	TextDrawHideForPlayer(playerid,Textdraw6);
   	pInfo[playerid][VehBuy] = 0;
   	pInfo[playerid][VehBuyType] = 0;
   	DestroyVehicle(pInfo[playerid][VehBuyId]);
   	pInfo[playerid][VehBuyId] = 0;
    return 1;
}
Reply


Messages In This Thread
Crash... - by Fjclip99 - 28.10.2014, 16:44
Re: Crash... - by Fjclip99 - 28.10.2014, 18:51
Re: Crash... - by Blademaster680 - 28.10.2014, 23:09
Re: Crash... - by Fjclip99 - 29.10.2014, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)