weapons in interiors disabled
#1

Hi all,how to disable weapons in interior? (Like cluckinbell,ammunation ecc..)
Reply
#2

AllowInteriorWeapons(0);

on GameModeInit.

Try it.
Reply
#3

pawn Код:
AllowInteriorWeapons(0);
This forum requires that you wait 120 seconds between posts. Please try again in 30 seconds.
>.<
Reply
#4

I have tried e times.
it does not work.

can someone help me please?
Reply
#5

Quote:
Originally Posted by Saitecx
Посмотреть сообщение
I have tried e times.
it does not work.

can someone help me please?
Try f times.

Did you recompile the script, and restart the server?
Reply
#6

What means with f times?

Yes I did, but it's does not work. why?
Reply
#7

Quote:
Originally Posted by Saitecx
Посмотреть сообщение
What means with f times?

Yes I did, but it's does not work. why?
Well you said you had tried e times.


Where did you put AllowInteriorWeapons?

If you really can't get it to work, use this:
pawn Код:
public OnPlayerUpdate( playerid )
{
    static
        s_Interior,
        s_Weapon
    ;
   
    s_Interior = GetPlayerInterior( playerid );
    s_Weapon = GetPlayerWeapon( playerid );
   
    if ( s_Interior && s_Weapon && s_Weapon != WEAPON_BRASSKNUCKLE )
        SetPlayerArmedWeapon( playerid, s_Weapon ? WEAPON_BRASSKNUCKLE : 0 );
   
    return 1;
}

I don't remember if SetPlayerArmedWeapon works with weaponid 0 or not, I can't test at the moment. If you're thuper-duper desperate, then you can simply give players brass knuckles when they spawn and the code will definitely work.
Reply
#8

Код:
C:\Users\Lukas\Desktop\0.3 Server\gamemodes\SERVER-lvdm.pwn(1546) : error 017: undefined symbol "SetPlayerArmedWeapon"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line:
pawn Код:
SetPlayerArmedWeapon( playerid, s_Weapon ? WEAPON_BRASSKNUCKLE : 0 );
Reply
#9

pawn Код:
AllowInteriorWeapons(1);
1 to allow, 0 to disable!
Reply
#10

Still error:

Код:
C:\Users\Lukas\Desktop\0.3 Server\gamemodes\SERVER-lvdm.pwn(1547) : error 017: undefined symbol "SetPlayerArmedWeapon"
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Error.
no one can help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)