[Ajuda] Variavel
#1

Queria saber qual й minha variavel ?

Код:
 CMD:setadmin(playerid, params[])
{
    new id, level, string[256], string2[256], ganhou[MAX_PLAYER_NAME], deu[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD0000AA, "{00E5FF}Vocк nгo estб autorizado.");
    if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, 0xAD0000AA, "Use /daradmin [ID] [LEVEL]");
    if (level < 0 || level > 5) return SendClientMessage(playerid, 0xFF0000FF, "Level invбlido. Use de 1 б 5 .");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "Este jogador nгo estб online.");
    GetPlayerName(id, ganhou, sizeof(ganhou));
    GetPlayerName(playerid, deu, sizeof(deu));
    format(string, sizeof(string), "Vocк deu admin level %s para o %s", GetLevelAdmin(level), ganhou);
    SendClientMessage(playerid, 0x00F6F6AA, string);
    format(string2, sizeof(string2), "O admin %s deu admin level %s para vocк.", deu , GetLevelAdmin(level));
    SendClientMessage(id, Verde, string2);
    pAdmin[id][Level] =  level;
    return 1;
}
Reply
#2

RESPOSTA DEBAIXO TБ MELHOR...
Reply
#3

pawn Код:
IsPlayerAdmin(playerid) // esta define se e RCON
pAdmin[id][Level] =  level; // esta coloca o id para o level que vc colocar
IsPlayerConnected(id) // verifica se o id esta conectado
if (level < 0 || level > 5) // verifica se vc coloca um level ao id entre 0 e 5 caso contrario recebe msg de erro
Reply
#4

Код:
pAdmin[id][Level] = level;
Reply
#5

Код:
CMD:aportao(playerid)
{
 if pAdmin[id][Level] = level;
   MoveObject(Portao, -302.29998779297,1507.4000244141,71.59999474121, 3);
   PlayerPlaySound(playerid, 1153, 652.7355,-608.3027,16.2864);
   new String[120];
   format(String, sizeof(String), "[INFO] %s Abriu o portгo do drift principal.", rNome(playerid));
   SendClientMessageToAll(Cinza, String);
   return 1;
}
porque tipow eu queria definir esse comando sу para admin level 1
CMD:aportao(playerid)
{
if pAdmin[id][Level] = level;
MoveObject(Portao, -302.29998779297,1507.4000244141,71.59999474121, 3);
PlayerPlaySound(playerid, 1153, 652.7355,-608.3027,16.2864);
new String[120];
format(String, sizeof(String), "[INFO] %s Abriu o portгo do drift principal.", rNome(playerid));
SendClientMessageToAll(Cinza, String);
return 1;
}
sendo que o burro aqui n ta conseguindo eu fiz 1 vez dps n conseguir mas...
Reply
#6

pawn Код:
CMD:aportao(playerid)
{
    if(pAdmin[playerid][Level] >= 1)
    {
        MoveObject(Portao, -302.29998779297,1507.4000244141,71.59999474121, 3);
        PlayerPlaySound(playerid, 1153, 652.7355,-608.3027,16.2864);
        new String[120];
        format(String, sizeof(String), "[INFO] %s Abriu o portгo do drift principal.", rNome(playerid));
        SendClientMessageToAll(Cinza, String);
        return 1;
    }
    else
    {
        SendClientMessage(playerid, -1,"Vocк nгo й admin...");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)