Strange bug.
#1

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

Perhaps this?
pawn Код:
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;
}
Reply
#3

No. I said
Quote:

When player dies in vehicle

Reply
#4

Show me the OnPlayerDeath and OnPlayerSpawn. I suggest using pastebin to show the script.
Reply
#5

i had this on sa-mp debug.exe its very strange... ur running fsdebug?
Reply
#6

Quote:

Show me the OnPlayerDeath and OnPlayerSpawn.

This is not necessary. This callbacks are correct and the are linked to the whole mode.
I know about bug when use SpawnPlayer if ped is in vehicle, but I remove him from vehicle and nothing...
Is there a way to fix exactly this?
Quote:

ur running fsdebug?

Nope. This is in my mode.
Reply
#7

since this happened to me on 0.2x sa-mp debug and i havent been on the debug since then i suppose this is an sa-mp bug...
also do u use UsePlayerPedAnims() ? this can cause it.
Reply
#8

Quote:
Originally Posted by Butilka
Посмотреть сообщение
No. I said
Quote:

When player dies in vehicle

My bad...
Try this:

pawn Код:
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;
}
Reply
#9

IsDeadInVehicle[playerid]++; wtf?
use IsDeadInVehicle[playerid] = 1;
Reply
#10

= 1 never works for me in .3b - so i use ++ to achieve the same thing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)