[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(playeridparams[])
{
    new 
Jogador[24];
    new 
count 0;
    new 
msg[120];
    for(new 
i=0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && PlayerInfo[i][Admin])
        {
            
GetPlayerName(i,Jogador,24);
            
format(msgsizeof(msg), "Staff online %s"Jogador);
            
SendClientMessage(playerid, -1msg);
            
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(playeridparams[]) 

    new 
Jogador[24]; 
    new 
count 0
    new 
msg[120]; 
    for(new 
i=0MAX_PLAYERSi++) 
    { 
        if(
IsPlayerConnected(i) && PlayerInfo[i][Admin]) 
        { 
            
GetPlayerName(i,Jogador,24); 
            
format(msgsizeof(msg), "Staff online %s"Jogador); 
            
SendClientMessage(playerid, -1msg); 
            
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 0msg[120];
    for(new 
0MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i) && PlayerInfo[i][Admin]) {
            
GetPlayerName(iJogador,24);
            
format(msgsizeof(msg), "Staff online %s"Jogador);
            
SendClientMessage(playerid, -1msg);
            
count++;
        }
    }
    if(
count == 0SendClientMessage(playerid0xFF0000AA ,"No momento estamos sem staffs online!");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)