[AJUDA] Criando gang exclusiva para admins
#1

pawn Код:
//no topo
#define ADMINS 8
pawn Код:
//ADMINS
    AddPlayerClass(294, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(295, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(296, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(217, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(211, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
pawn Код:
else if(classid >= 20 && classid <= 25)
    {
        Gang[playerid] = ADMINS;
        GameTextForPlayer(playerid,"~y~Administradores",6000,6);
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"Vocк nгo й Administrador!");
    }
pawn Код:
if(Gang[playerid] == ADMINS)
    {
         SetPlayerChatBubble(playerid, "Administrador do Servidor", COLOR_RED, 100.0, 10000);
         return 1;
    }
Ajuda aК carai!!11 onze11
Como deixo exclusivo para admins logados na rcon? '-'
Reply
#2

Usa IsPlayerAdmin


https://sampwiki.blast.hk/wiki/IsPlayerAdmin
Reply
#3

RequestClass fiz uma gambiarra do carai.
Tirei o add class do ongamemodeinit e coloquei no request...

pawn Код:
if(IsPlayerAdmin(playerid))
     {
     //ADMINS
    AddPlayerClass(294, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(295, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(296, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(217, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    AddPlayerClass(211, 413.6844,2536.1543,19.1484,180.4662,0,0,0,0,0,0); //admins
    }
    else if(classid >= 20 && classid <= 25)
    {
        Gang[playerid] = ADMINS;
        GameTextForPlayer(playerid,"~y~Administradores",6000,6);
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"Vocк nгo й Administrador!");
    }
Compilou certinho, tem algo de errado aк?
Reply
#4

Se compilou nгo, mas se tem algo errado, sу testando.

Org de admin na RCON? Tenso.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)