OnPlayerSpawn not getting called.
#5

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
playerState GetPlayerState(killerid), vehicleid GetPlayerVehicleID(playerid);
    if (
playerState == PLAYER_STATE_DRIVER)
    {
        new 
string[127];
        if(
IsAHelicopter(vehicleid))
        {
            
RemovePlayerFromVehicle(killerid);
            
format(stringsizeof(string), "AdmCmd: %s was prisoned by %s, reason: Heli-Blading"PlayerRPName(killerid), PlayerRPName(playerid));
             
SendClientMessageToAll(TOMATOstring);
             
            
AccountData[killerid][pPrisoned] = 2;
            
AccountData[killerid][pPrisonTime] = 30 60;
              
SetPlayerPos(killerid264.628877.57421001.0391);
            
SetPlayerInterior(killerid6);
            
SetPlayerVirtualWorld(killeridkillerid+1337);
            
SetPlayerColor(killerid0xF4A41900);
            
ClearWeapons(killerid);
            if (
PlayerCuffed[killerid])
            {
                
SetPlayerSpecialAction(killeridSPECIAL_ACTION_NONE);
                
RemovePlayerAttachedObject(killerid1);
            }
        }
    }
    if(
AccountData[playerid][pPrisoned] >= 1)
    {
        
SetPlayerInterior(playerid6);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid0xED9111FF);
        
SetPlayerPos(playerid264.273377.41411001.0391);
        
SetPlayerFacingAngle(playerid269.7870);
        
TogglePlayerControllable(playerid1);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        return 
1;
    }
    else
    {
        switch(
PlayerJustDied[playerid])
        {
            case 
1:
            {
                
PlayerJustDied[playerid] = 0;
                
AccountData[playerid][pHospitalized] = 1;
                
printf("1: Player %d is dieng | Just died? %d"playeridPlayerJustDied[playerid]);
            }
            case 
0:
               {
                   
GetPlayerPos(playeridDeathStuff[playerid][DeathX], DeathStuff[playerid][DeathY], DeathStuff[playerid][DeathZ]);
                
GetPlayerFacingAngle(playeridDeathStuff[playerid][DeathA]);
                
DeathStuff[playerid][DeathInt] = GetPlayerInterior(playerid);
                
DeathStuff[playerid][DeathHP] = 100;
                for(new 
0i<13;i++)
                {
                    
GetPlayerWeaponData(playeridiDeathWeapons[playerid][i][0], DeathWeapons[playerid][i][1]);
                }
                
PlayerJustDied[playerid] = 1;
                
AccountData[playerid][pHospitalized] = 0;
                
printf("0: Player %d is dieng | Just died? %d"playeridPlayerJustDied[playerid]);
            }
        }
    }
    if (
IsBeingSpeced[playerid])
    {
        foreach(
Player,i)
        {
            if(
SpectatingID[i] == playerid)
            {
                
TogglePlayerSpectating(i,false);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
OnPlayerSpawn not getting called. - by jihadmeneer - 05.04.2014, 09:09
Re: OnPlayerSpawn not getting called. - by Dokins - 05.04.2014, 09:31
Re: OnPlayerSpawn not getting called. - by jihadmeneer - 05.04.2014, 09:43
Re: OnPlayerSpawn not getting called. - by Dokins - 05.04.2014, 09:59
Re: OnPlayerSpawn not getting called. - by jihadmeneer - 05.04.2014, 10:01
Re: OnPlayerSpawn not getting called. - by Dokins - 05.04.2014, 10:24
Re: OnPlayerSpawn not getting called. - by jihadmeneer - 05.04.2014, 10:25
Re: OnPlayerSpawn not getting called. - by Dokins - 05.04.2014, 10:27
Re: OnPlayerSpawn not getting called. - by jihadmeneer - 05.04.2014, 10:28
Re: OnPlayerSpawn not getting called. - by Dokins - 05.04.2014, 10:31

Forum Jump:


Users browsing this thread: 2 Guest(s)