Help with disable weapons (rep+) - 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)
+--- Thread: Help with disable weapons (rep+) (
/showthread.php?tid=320621)
Help with disable weapons (rep+) -
boyan96 - 23.02.2012
How i can disable all weapons in zone and when the player go out from that zone to have the same weapons which he had
Re: Help with disable weapons (rep+) -
JhnzRep - 24.02.2012
Under OnPlayerUpdate put this:
pawn Код:
if(IsPlayerInArea(playerid, AREA INFO HERE)
{
ResetPlayerWeapons(playerid);
}
This will get you started, but giving them back you will have to do something else.
Re: Help with disable weapons (rep+) -
DeathTone - 24.02.2012
This will work:
pawn Код:
public OnPlayerUpdate(playerid)
if(IsPlayerInArea(playerid, AREA INFO HERE)
{
SetPlayerArmedWeapon(playerid, 0);
}
}
And it wont take the weapons away, so they can re-use them when they exit the area.
Re: Help with disable weapons (rep+) -
JhnzRep - 24.02.2012
Quote:
Originally Posted by DeathTone
This will work:
pawn Код:
public OnPlayerUpdate(playerid) if(IsPlayerInArea(playerid, AREA INFO HERE) { SetPlayerArmedWeapon(playerid, 0); } }
And it wont take the weapons away, so they can re-use them when they exit the area.
|
Smart thinking. Good job
Re: Help with disable weapons (rep+) -
boyan96 - 24.02.2012
yes but when he go out

i wont to have the same weapons
Re: Help with disable weapons (rep+) -
DeathTone - 24.02.2012
Yes you will, it just sets your armed weapon to fists, while your in the area, when you leave it, your weapons will be "unlocked". No weapons are being removed. Nao give me my rep I came here for, kthnx
Re: Help with disable weapons (rep+) -
Marco_Valentine - 25.02.2012
you need to save the weapons and in order to do that you need more functions.
I will make a small tutorial for a desert eagle. give me 2 minutes
Re: Help with disable weapons (rep+) -
JhnzRep - 25.02.2012
Quote:
Originally Posted by Marco_Valentine
you need to save the weapons and in order to do that you need more functions.
I will make a small tutorial for a desert eagle. give me 2 minutes
|
I'm pretty sure it has already been answered.
Re: Help with disable weapons (rep+) -
Marco_Valentine - 25.02.2012
i see o.o