A little help.
#1

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerInArea(playerid, 1153.0000, 1307.5000, -2107.5000, -2003.5000) == 1)
{
SendClientMessage(playerid,COLOR_RED,"You are not allawed to repair your vehicle in /BloodringArena.");
}
else
{
SetVehicleHealth(GetPlayerVehicleID(playerid),1000 .0);
SendClientMessage(playerid,COLOR_BASIC,"Your vehicle has been fixed.");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
}
}
return 1;
}

IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}

if(IsPlayerInArea(playerid, 1153.0000, 1307.5000, -2107.5000, -2003.5000) == 1)


how does this work I thought it would be X,Y,Z but there is 4 spots so I'm not sure how this works.
Reply
#2

Float:minx, Float:maxx, Float:miny, Float:maxy

Itґs like player boundries
Reply
#3

Look for Seifs IsPlayerInArea Generator or just use PlayerToPoint
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)