Enabling Interior weapons...
#1

... For Certain interiors..

Is it possible to enable interior weapons for one interior?

I only want it to be within a certain area too..

So for example, if i was liberty city, thats interior 1, would i be able to enable weapons for interior one in the liberty city area?

And for the thers in interior one weapons will be disabled..

Is it possible?
Reply
#2

IfPlayerToPoint..
or
IsPlayerInArea
Reply
#3

I've used that for disabling players weapons and returning them once they leave an area, but never used it to enable weapons in an interior...

How would that work?
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)