09.04.2012, 22:10
pawn Код:
new
bool:HideLocation[MAX_PLAYERS]
;
CMD:hidelocation(playerid, params[])
{
if(!IsPlayerLuxAdminLevel(playerid, 1))
{
return SendClientMessage(playerid, -1, "You are not an admin.");
}
if(HideLocation[playerid])
{
HideLocation[playerid] = false;
}
else
{
HideLocation[playerid] = true;
}
return 1;
}
CMD:information(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Usage: /location [id]");
new
pID = strval(params),
zName[64] = "Unknown Location",
iStr[128];
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "Invalid ID!");
if(HideLocation[playerid])
{
format(iStr, sizeof(iStr), "Location of %s(%d): San Andreas", pName(pID), pID);
}
else
{
GetPlayerInZone(pID, zName, 64);
format(iStr, sizeof(iStr), "Location of %s(%d): %s", pName(pID), pID, zName);
}
SendClientMessage(playerid, G, iStr);
return 1;
}

