[ajuda] Erro de Celula
#1

Nao intendo Acho que nao estou dando certo com celulas :P

O Comando /a Esta cortanto pela Metade a Frase:

Exemplo:

/a Teste de Comando do Chat De Administradores

[Admin] Teste de Comandos Do Chat De Ad.

pawn Код:
CMD:a(playerid, params[])
{
    new String4[258];
    if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "s", String4)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso Correto: /a [Texto]");

    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String4, sizeof(String4), "[Admin] %s: %s", Nome, String4);
    SendClientMessageToAll(AZUL_CLARO_3, String4);

    return 1;
}
Reply
#2

Corrigindo
pawn Код:
CMD:a(playerid, params[])
{
    new String4[128];
    if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "s[128]", String4)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso Correto: /a [Texto]");

    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String4, sizeof(String4), "[Admin] %s: %s", Nome, String4);
    SendClientMessageToAll(AZUL_CLARO_3, String4);

    return 1;
}
256 Cйlulas й muito 128 ja ta de bom tamanho
espero que de certo!
Reply
#3

pawn Код:
CMD:a(playerid, params[])
{
    new String4;
    if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "s[128]", String4)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso Correto: /a [Texto]");

    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String4, sizeof(String4), "[Admin] %s: %s", Nome, String4);
    SendClientMessageToAll(AZUL_CLARO_3, String4);

    return 1;
}
Reply
#4

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
Nao intendo Acho que nao estou dando certo com celulas :P

O Comando /a Esta cortanto pela Metade a Frase:

Exemplo:

/a Teste de Comando do Chat De Administradores

[Admin] Teste de Comandos Do Chat De Ad.

pawn Код:
CMD:a(playerid, params[])
{
    new String4[258];
    if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "s", String4)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso Correto: /a [Texto]");

    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String4, sizeof(String4), "[Admin] %s: %s", Nome, String4);
    SendClientMessageToAll(AZUL_CLARO_3, String4);

    return 1;
}
Quando nгo й colocado o tamanho da string no sscanf, o sscanf determina o tamanho 32 e como seu texto e maior й cortado ao meio! Sempre use o tamanho das string no format do sscanf!
Reply
#5

Quote:
Originally Posted by dPlaYer_
Посмотреть сообщение
pawn Код:
CMD:a(playerid, params[])
{
    new String4;
    if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "s[128]", String4)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso Correto: /a [Texto]");

    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String4, sizeof(String4), "[Admin] %s: %s", Nome, String4);
    SendClientMessageToAll(AZUL_CLARO_3, String4);

    return 1;
}
Oloko meu..

Essa sua respota fez sacanagem com a board!

new String4; >> Puts griladas!
Reply
#6

Nao Tem Como Dar +REP Para os 3.

Obrigado Ajudou e Ficou do Tamanho Certo rsrs !

Dei REP para o blacktrindade Por Ele Ter Menos REP que Voces Mais Meritos de Voces Tambem, Ajudou '-'

Vlws jaja Volto com mais Erros :P
Reply
#7

Quote:
Originally Posted by Mr.Hardy
Посмотреть сообщение
Oloko meu..

Essa sua respota fez sacanagem com a board!

new String4; >> Puts griladas!
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKKKKKKkk'

Epic !
Reply
#8

Tira o new String4 e coloca isso
pawn Код:
if(sscanf(params, "s[e o Tamanho da String]", String4))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)