Fast question.
#1

Okay... Made a thread before, and it seems to be way too long, cus nobody is answering it.
The question is:
When the player dies, he loses his weapons. I dont want that to happend. How do i fix that?

Thanks.
Reply
#2

Nobody knows how?
Reply
#3

I uncertain if you can receive player weapon info when a player dies, but here's how it will work if you can:
pawn Код:
new pWeaponsOnDeath[13];
nee pAmmoOnDeath[13];
public OnPlayerDeath(playerid,killerid,reason)
{
    for(new w;w<13;w++;)
    {
        GetPlayerWeaponData(playerid,w,pWeaponsOnDeath[w],pAmmoOnDeath[w]);
    }
}

public OnPlayerSpawn(playerid)
{
    for(new w;w<13;w++;)GivePlayerWeapon(playerid,pWeaponsOnDeath[w],pAmmoOnDeath[w]);
}

public OnPlayerConnect(playerid)
{
    for(new w;w<13;w++)
    {
        pWeaponsOnDeath[w]=0;
        pAmmoOnDeath[w]=0;
    }
}
Reply
#4

Oh, thanks, ill take a look
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)