Hide Admin Location? +REP
#5

Quote:
Originally Posted by Toreno
Посмотреть сообщение
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;
}
Discard my last post. This one works! Thanks!


AND also, is there a possible way to let it notify when it's hiding. For example when I type in /hidelocation, it will say "Your Location Has Been Hidden" and when I type in /showlocation it will say "Your Location Is Now Public"
Reply


Messages In This Thread
Hide Admin Location? +REP - by TheMightyEddy - 09.04.2012, 22:02
Re: Hide Admin Location? +REP - by ViniBorn - 09.04.2012, 22:10
Re: Hide Admin Location? +REP - by Toreno - 09.04.2012, 22:10
Re: Hide Admin Location? +REP - by TheMightyEddy - 09.04.2012, 22:15
Re: Hide Admin Location? +REP - by TheMightyEddy - 09.04.2012, 22:18
Re: Hide Admin Location? +REP - by ViniBorn - 09.04.2012, 22:20
Re: Hide Admin Location? +REP - by Jack.7331 - 09.04.2012, 22:21
Re: Hide Admin Location? +REP - by Toreno - 09.04.2012, 22:22
Re: Hide Admin Location? +REP - by TheMightyEddy - 09.04.2012, 22:22
Re: Hide Admin Location? +REP - by TheMightyEddy - 09.04.2012, 22:24

Forum Jump:


Users browsing this thread: 1 Guest(s)