Posts: 164
Threads: 30
Joined: May 2008
Reputation:
0
And how to disable weapons? What is the function?
Posts: 602
Threads: 3
Joined: Jun 2009
Reputation:
0
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);
}
Posts: 164
Threads: 30
Joined: May 2008
Reputation:
0
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
Posts: 602
Threads: 3
Joined: Jun 2009
Reputation:
0
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.