SA-MP Forums Archive
weapons in interiors disabled - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: weapons in interiors disabled (/showthread.php?tid=176151)



weapons in interiors disabled - Face9000 - 12.09.2010

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


Re: weapons in interiors disabled - CrucixTM - 12.09.2010

AllowInteriorWeapons(0);

on GameModeInit.

Try it.


Re: weapons in interiors disabled - Claude - 12.09.2010

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


AW: weapons in interiors disabled - Saitecx - 18.10.2010

I have tried e times.
it does not work.

can someone help me please?


Re: AW: weapons in interiors disabled - Slice - 18.10.2010

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?


AW: weapons in interiors disabled - Saitecx - 18.10.2010

What means with f times?

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


Re: AW: weapons in interiors disabled - Slice - 18.10.2010

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.


AW: weapons in interiors disabled - Saitecx - 18.10.2010

Код:
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 );



Re: weapons in interiors disabled - Jakku - 18.10.2010

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


Re: weapons in interiors disabled - Saitecx - 19.10.2010

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?