[Ajuda] Comandos /admins
#1

Olб, estou com problema nгo consigo resolver.

Pesquisei em vбrios cantos que deu mais certo foi um que encontrei mas quando o for vai roda fica dando erro.
Se alguйm pode me ajuda fico grato.

PHP код:
CMD:admins(playerid, params[])
{
    new 
Jogador[24];
    new 
count = 0;
    new 
msg[120];
    for(new 
i=0, i < MAX_PLAYERS; i++)
    {
        if(
IsPlayerConnected(i) && PlayerInfo[i][Admin])
        {
            
GetPlayerName(i,Jogador,24);
            
format(msg, sizeof(msg), "Staff online %s", Jogador);
            
SendClientMessage(playerid, -1, msg);
            
count++;
        }
    }
    if(
count == 0)
    {
    
SendClientMessage(playerid,0xFF0000AA ,"No momento estamos sem staffs online!");
    }
    return 
1;
} 
Reply
#2

que erro ?
Reply
#3

Tente assim !

PHP код:
CMD:admins(playerid, params[]) 
{ 
    new 
Jogador[24]; 
    new 
count = 0; 
    new 
msg[120]; 
    for(new 
i=0; i < MAX_PLAYERS; i++) 
    { 
        if(
IsPlayerConnected(i) && PlayerInfo[i][Admin]) 
        { 
            
GetPlayerName(i,Jogador,24); 
            
format(msg, sizeof(msg), "Staff online %s", Jogador); 
            
SendClientMessage(playerid, -1, msg); 
            
count++; 
        } 
    } 
    if(
count == 0) 
    { 
    
SendClientMessage(playerid,0xFF0000AA ,"No momento estamos sem staffs online!"); 
    } 
    return 
1; 
} 
Reply
#4

Funcionou vlw!
Mas fiquei integrado o que estava de errado ?
Reply
#5

Apenas a vнrgula
pawn Код:
for(new i=0, i < MAX_PLAYERS; i++)
pawn Код:
for(new i=0; i < MAX_PLAYERS; i++)
Reply
#6

Putz! entendi.
Vlw ViniBorn!
Reply
#7

PHP код:
CMD:admins(playerid) {
    new 
Jogador[24], count = 0, msg[120];
    for(new 
i = 0; i < MAX_PLAYERS; i++) {
        if(
IsPlayerConnected(i) && PlayerInfo[i][Admin]) {
            
GetPlayerName(i, Jogador,24);
            
format(msg, sizeof(msg), "Staff online %s", Jogador);
            
SendClientMessage(playerid, -1, msg);
            
count++;
        }
    }
    if(
count == 0) SendClientMessage(playerid, 0xFF0000AA ,"No momento estamos sem staffs online!");
    return 
1;
} 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)