[Ajuda] o Comando Esta indo
#1

O Comando Esta Indo Sem Botar o Id da pessoa /trazer traz eu msm '-' /limparadmin limpa eu msm
PHP код:
CMD:limparadmin(playeridparams[])
{
    new 
idplayer[MAX_PLAYER_NAME], tirou[MAX_PLAYER_NAME], string[256], string2[256];
    if (
pAdmin[playerid][Level] != 5) return SendClientMessage(playerid0xAD0000AA"Vocк nгo estб autorizado.");
    if (
sscanf(params"u"id)) return SendClientMessage(playerid0xAD0000AA"Use /limparadmin [ID] ");
    if (
pAdmin[id][Level] < 1) return SendClientMessage(playeridVERMELHO"Este player nгo й admin ! ");
    
GetPlayerName(idplayersizeof(player));
    
GetPlayerName(playeridtirousizeof(tirou));
    
format(stringsizeof(string), "Vocк tirou o admin do %s"player);
    
SendClientMessage(playerid0x00F6F6AAstring);
    
format(string2sizeof(string2), "O admin %s tirou seu admin."tirou);
    
SendClientMessage(idVERDEstring2);
    
pAdmin[playerid][Level] = 0;
    return 
1;
 } 
PHP код:
CMD:trazer(playeridparams[])
{
    if(
pAdmin[playerid][Level] < 1) return SendClientMessage(playeridVERMELHO,"Vocк nгo estб autorizado.");
    new 
idFloatxFloatyFloatzstring[256], string2[256], namep[MAX_PLAYER_NAME], namead[MAX_PLAYER_NAME];
    if(
sscanf(params"u"id)) return SendClientMessage(playeridVERMELHO,"Use /trazer [ID]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playeridVERMELHO,"Este jogador nгo estб online.");
    
GetPlayerName(playeridnameadsizeof(namead));
    
GetPlayerName(idnamepsizeof(namep));
    
format(stringsizeof(string), "Trouxe o player %s atй vocк."namep);
    
format(string2sizeof(string2), "O Administrador %s  trouxe vocк atй ele."namead);
    
SendClientMessage(playeridPURPLEstring);
    
SendClientMessage(idVERDEstring2);
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(idx+1y+1z);
    return 
1;

Reply
#2

pawn Код:
CMD:limparadmin(playerid, params[])
{
    new id, player[MAX_PLAYER_NAME], tirou[MAX_PLAYER_NAME], string[256], string2[256];
    if (pAdmin[playerid][Level] != 5) return SendClientMessage(playerid, 0xAD0000AA, "Vocк nгo estб autorizado.");
    if (sscanf(params, "i", id)) return SendClientMessage(playerid, 0xAD0000AA, "Use /limparadmin [ID] ");
    if (pAdmin[id][Level] < 1) return SendClientMessage(playerid, VERMELHO, "Este player nгo й admin ! ");
    GetPlayerName(id, player, sizeof(player));
    GetPlayerName(playerid, tirou, sizeof(tirou));
    format(string, sizeof(string), "Vocк tirou o admin do %s", player);
    SendClientMessage(playerid, 0x00F6F6AA, string);
    format(string2, sizeof(string2), "O admin %s tirou seu admin.", tirou);
    SendClientMessage(id, VERDE, string2);
    pAdmin[id][Level] = 0;
    return 1;
 }
pawn Код:
CMD:trazer(playerid, params[])
{
    if(pAdmin[playerid][Level] < 1) return SendClientMessage(playerid, VERMELHO,"Vocк nгo estб autorizado.");
    new id, Float: x, Float: y, Float: z, string[256], string2[256], namep[MAX_PLAYER_NAME], namead[MAX_PLAYER_NAME];
    if(sscanf(params, "i", id)) return SendClientMessage(playerid, VERMELHO,"Use /trazer [ID]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, VERMELHO,"Este jogador nгo estб online.");
    GetPlayerName(playerid, namead, sizeof(namead));
    GetPlayerName(id, namep, sizeof(namep));
    format(string, sizeof(string), "Trouxe o player %s atй vocк.", namep);
    format(string2, sizeof(string2), "O Administrador %s  trouxe vocк atй ele.", namead);
    SendClientMessage(playerid, PURPLE, string);
    SendClientMessage(id, VERDE, string2);
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(id, x+1, y+1, z);
    return 1;
}
Reply
#3

Use sscanf neste comando!
PHP код:
CMD:trazer(playeridparams[])
{
    if(
pAdmin[playerid][Level] < 1) return SendClientMessage(playeridVERMELHO,"Vocк nгo estб autorizado.");
    new 
idFloatxFloatyFloatzstring[256], string2[256], namep[MAX_PLAYER_NAME], namead[MAX_PLAYER_NAME];
    if(
sscanf(params"i"id)) return SendClientMessage(playeridVERMELHO,"Use /trazer [ID]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playeridVERMELHO,"Este jogador nгo estб online.");
    
GetPlayerName(playeridnameadsizeof(namead));
    
GetPlayerName(idnamepsizeof(namep));
    
format(stringsizeof(string), "Trouxe o player %s atй vocк."namep);
    
format(string2sizeof(string2), "O Administrador %s  trouxe vocк atй ele."namead);
    
SendClientMessage(playeridPURPLEstring);
    
SendClientMessage(idVERDEstring2);
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(idx+1y+1z);
    return 
1;

Reply
#4

Aproveitando msm topico Olha So
PHP код:
static stock MsgADM(COLOR,const striing[],level)
{
    foreach(
Playeri)
    {
        if (
PlayerInfo[i][pAdmin] >= level)
        {
            
SendClientMessage(iCOLORstriing);
        }
        if (
PlayerInfo[i][pAdminTemp] >= level)
        {
            
SendClientMessage(iCOLORstriing);
        }
    }
    
printf("%s"striing);
    return 
true;

PHP код:
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(180) : error 017undefined symbol "PlayerInfo"
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(180) : warning 215expression has no effect
C
:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(180) : error 001expected token";"but found "]"
C:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(180) : error 029invalid expressionassumed zero
C
:\Users\Usuario\Desktop\Nova pasta\gamemodes\BPS.pwn(180) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors

PHP код:
Meu tipo de ADM
pAdmin
[playerid][Level] = 5
Reply
#5

No primeiro comando, altere pAdmin[playerid][Level] = 0; para pAdmin[id][Level] = 0;

Tente alterar o "u" para "i" no sscanf:
sscanf(params, "u", id) >> sscanf(params, "i", id)

Ambos possuem uma pequena diferenзa.
Reply
#6

Quote:
Originally Posted by iTakelot
Посмотреть сообщение
Use sscanf neste comando!
PHP код:
CMD:trazer(playeridparams[])
{
    if(
pAdmin[playerid][Level] < 1) return SendClientMessage(playeridVERMELHO,"Vocк nгo estб autorizado.");
    new 
idFloatxFloatyFloatzstring[256], string2[256], namep[MAX_PLAYER_NAME], namead[MAX_PLAYER_NAME];
    if(
sscanf(params"u"id)) return SendClientMessage(playeridVERMELHO,"Use /trazer [ID]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playeridVERMELHO,"Este jogador nгo estб online.");
    if (
sscanf(params"u"id)) SendClientMessage(playerid0xFF0000AA"Use: /trazer [id]");
    else
    {
        
GetPlayerName(playeridnameadsizeof(namead));
        
GetPlayerName(idnamepsizeof(namep));
        
format(stringsizeof(string), "Trouxe o player %s atй vocк."namep);
        
format(string2sizeof(string2), "O Administrador %s  trouxe vocк atй ele."namead);
        
SendClientMessage(playeridPURPLEstring);
        
SendClientMessage(idVERDEstring2);
        
GetPlayerPos(playeridxyz);
        
SetPlayerPos(idx+1y+1z);
     }
    return 
1;
}
CMD:limparadmin(playeridparams[])
{
    new 
idplayer[MAX_PLAYER_NAME], tirou[MAX_PLAYER_NAME], string[256], string2[256];
    if (
pAdmin[playerid][Level] != 5) return SendClientMessage(playerid0xAD0000AA"Vocк nгo estб autorizado.");
    if (
sscanf(params"u"id)) return SendClientMessage(playerid0xAD0000AA"Use /limparadmin [ID] ");
    if (
pAdmin[id][Level] < 1) return SendClientMessage(playeridVERMELHO"Este player nгo й admin ! ");
    
GetPlayerName(idplayersizeof(player));
    
GetPlayerName(playeridtirousizeof(tirou));
    
format(stringsizeof(string), "Vocк tirou o admin do %s"player);
    
SendClientMessage(playerid0x00F6F6AAstring);
    
format(string2sizeof(string2), "O admin %s tirou seu admin."tirou);
    
SendClientMessage(idVERDEstring2);
    
pAdmin[id][Level] = 0;
    return 
1;
 } 
pawn Код:
CMD:trazer(playerid, params[])
{
    if(pAdmin[playerid][Level] < 1) return SendClientMessage(playerid, VERMELHO,"Vocк nгo estб autorizado.");
    new id, Float: x, Float: y, Float: z, string[256], string2[256], namep[MAX_PLAYER_NAME], namead[MAX_PLAYER_NAME];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, VERMELHO,"Use /trazer [ID]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, VERMELHO,"Este jogador nгo estб online.");
    if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Use: /trazer [id]");
    else
    {
        GetPlayerName(playerid, namead, sizeof(namead));
        GetPlayerName(id, namep, sizeof(namep));
        format(string, sizeof(string), "Trouxe o player %s atй vocк.", namep);
        format(string2, sizeof(string2), "O Administrador %s  trouxe vocк atй ele.", namead);
        SendClientMessage(playerid, PURPLE, string);
        SendClientMessage(id, VERDE, string2);
        GetPlayerPos(playerid, x, y, z);
        SetPlayerPos(id, x+1, y+1, z);
     }
    return 1;
}
Nгo entendi nada do que vocк tentou fazer ai no script acima
Reply
#7

Quote:
Originally Posted by FallweN
Посмотреть сообщение
Nгo entendi nada do que vocк tentou fazer ai no script acima
Um discuido meu ,kkkk nem percebi @edit
Reply
#8

Quote:
Originally Posted by iTakelot
Посмотреть сообщение
Um discuido meu ,kkkk nem percebi @edit
Ainda estб incorreto pois no comando ele jб usa sscanf.

Pode ter passado despercebido por vocк, ou seja estб sendo usado o sscanf 2 vezes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)