SA-MP Forums Archive
Too low admin level [rep+] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Too low admin level [rep+] (/showthread.php?tid=292910)



Too low admin level [rep+] - Chriham3 - 25.10.2011

Solved it.


Re: Too low admin level [rep+] - Kingunit - 25.10.2011

pawn Код:
COMMAND:setcompany(playerid, params[])
{
    if(PlayerInfo[pInfo][pAdmin] < 3) return SendClientMessage(playerid, 0xFFFFFFFF, "* y u no Admin");
    new giveplayerid, company, string[64];
    if (sscanf(params, "ud", giveplayerid, company)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /setcompany [playerid/partname] [companyid]");
    else if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
   
    format(string,sizeof(string), "You have successfully set the company id to %i.",company);
    SendClientMessage(playerid, 0x00FF00AA, string);
    format(string,sizeof(string), "You have been added to company: %i.",company);
    SendClientMessage(giveplayerid, 0x00FF00AA, string);
    Faction[giveplayerid] = company;
   
    return 1;
}