24.09.2010, 15:10
When player dies in vehicle and then spawns, after ~4000 ms he respawns but with siggy or bottle. Does anyone known how to fix it?
new IsDead[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
IsDead[playerid]++;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsDead[playerid] == 1)
{
ResetPlayerWeapons(playerid);
IsDead[playerid] = 0;
}
return 1;
}
When player dies in vehicle |
Show me the OnPlayerDeath and OnPlayerSpawn. |
ur running fsdebug? |
new IsDeadInVehicle[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInAnyVehicle(playerid) == 1)
{
IsDeadInVehicle[playerid]++;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsDeadInVehicle[playerid] == 1)
{
ResetPlayerWeapons(playerid);
IsDeadInVehicle[playerid] = 0;
}
return 1;
}