[HELP] Question
#1

Hi, how to make an area where it can not be armed? As an example the function AllowInteriorWeapons() but without being in the interior. Being any other area of San Andreas? Like safe zone

Thanks
Reply
#2

Here is a simple example.
http://forum.sa-mp.com/index.php?top...4003#msg904003

Or you can use a full area check system, see sig.

Then just disable weapons when players are in the area.
Reply
#3

And how to disable weapons? What is the function?
Reply
#4

to disable weapons

SetPlayerArmedWeapon(playerid, 0); will put them to hands

then if they try to change to another weapon
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(/*your area check*/) SetPlayerArmedWeapon(playerid, 0);
}

Reply
#5

stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
return 0;
}

Here, I change the X by my coords?

sorry but i never do scripts like this one
Reply
#6

no you would call this function with your coordinates.

IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y); <-- your coordinates here.

Reply
#7

Yeah, thanks brother
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)