Enabling Interior weapons...
#4

Use OnPlayerInteriorChange and use GetPlayerWeaponData to store their weapons when they enter the interior and give it back when they leave.

pawn Code:
new pW[MAX_PLAYERS][13]
new pA[MAX_PLAYERS][13];

public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
    if(newinteriorid == 0 && oldinteriorid == //interiorwithnoweapons)
    {
        for(new w=0;w<13;w++)
        {
            GivePlayerWeapon(playerid,pW[playerid][w],pA[playerid][w]);
        }
    }
    if(newinteriorid == //interiorwithnoweapons)
    {
        for(new w=0;w<13;w++)
        {
            GetPlayerWeaponData(playerid,w,pW[playerid][w],pA[playerid][w]);
            ResetPlayerWeapons(playerid);
        }
    }
}
Try that.
Reply


Messages In This Thread
Enabling Interior weapons... - by Outbreak - 01.02.2009, 22:10
Re: Enabling Interior weapons... - by AlExAlExAlEx - 01.02.2009, 23:25
Re: Enabling Interior weapons... - by Outbreak - 01.02.2009, 23:53
Re: Enabling Interior weapons... - by Backwardsman97 - 02.02.2009, 02:13

Forum Jump:


Users browsing this thread: 1 Guest(s)