23.07.2011, 22:40
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(IsPlayerInArea(playerid, /*MIN X*/, /*MIN Y*/, /*MAX X*/, /*MAX Y*/) && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You can't use any command here."); // CHANGE IsPlayerAdmin BY THE ADMIN VARIABLE
// COMMANDS ..
return 0;
}
stock IsPlayerInArea(playerid, Float:Xmin, Float:Ymin, Float:Xmax, Float:Ymax)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(x <= Xmin && y <= Ymin && x >= Xmax && y >= Ymax) return 1;
return 0;
}