How to disable weapons in certain interiors ? [Rep+]
#1

Hello ,

Does any1 can help me with interiors ? I want to block/disable weapons in Ammu-Nation so player can't fight with each other inside the shop . I have co-ordinates but don't know how to do that

Does any1 also know how I can close all interiors and have only open the selected one which I choose ? I know I can use -> DisableInteriorEnterExits(); but how I can open the selected interiors which I'm interested in for example Ammu-Nation or any other ?

Every help is appreciated.
I will give Rep+ to people who help me to solve the problem.

Thanks
NiceWizard
Reply
#2

pawn Код:
public OnGameModeInit()
{
    AllowInteriorWeapons(0);
    return 1;
}
Reply
#3

Somethings like that?

pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    if(GetPlayerInterior(playerid) == ID) // Amunation Interior
    {
        SetPlayerArmedWeapon(playerid, 0);
        return 0;
    }
    return 1;
}
Quote:

Does any1 also know how I can close all interiors and have only open the selected one which I choose ? I know I can use -> DisableInteriorEnterExits(); but how I can open the selected interiors which I'm interested in for example Ammu-Nation or any other ?

You will have to use DisableInteriorEnterExits(); and then creating a pickup who will allow you to teleport to ammunation interioir.
Reply
#4

Can I do that for multiple shops like this :

pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    if(GetPlayerInterior(playerid) == ID) // Amunation Interior
    if(GetPlayerInterior(playerid) == ID) // Different Interior 1
    if(GetPlayerInterior(playerid) == ID) // Different Interior 2
    {
        SetPlayerArmedWeapon(playerid, 0);
        return 0;
    }
    return 1;
}
Will this work like this ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)