Disable command in zone!
#1

heey guys

I want to disable a command in a zone! Because i make a DeathMatch zone but there are no vehicles alowed and i made a carmenu for the server.

Thanks Admigo
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, size of zone, middle_of_zone_X,  middle_of_zone_Z, middle_of_zone_Y))
{
SendClientMessage(playerid, COLOR, "You can't use this command within this zone!");
}
else
{
Let the command work
}
return 1;
}
Reply
#3

That ^ is not a zone, thats an area. A zone would be an area of something example. a 4x4 piece of graph paper is a zone, but that is just cords and won't work the same
Reply
#4

He probably wants to use this script I just made
pawn Код:
stock IsPlayerIn2DArea(playerid, Float:fMin_Y, Float:fMax_Y, Float:fMin_Y, Float:fMax_Y) // Written by Admantis
{
    new Float:fX, Float:fY;
    if (fX > fMin_X && fX < fMax_X && fY > fMin_Y && fY < fMax_Y)
        return true;
    return false;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)