[ajuda] Erro de Celula -
Maklister - 19.06.2012
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;
}
Re: [ajuda] Erro de Celula -
blacktrindade - 19.06.2012
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!
Re: [ajuda] Erro de Celula -
dPlaYer_ - 19.06.2012
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;
}
Re: [ajuda] Erro de Celula -
paulor - 19.06.2012
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!
Re: [ajuda] Erro de Celula -
Mr.Hardy - 19.06.2012
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!
Re: [ajuda] Erro de Celula -
Maklister - 19.06.2012
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
Re: [ajuda] Erro de Celula -
kinhobryant - 19.06.2012
Quote:
Originally Posted by Mr.Hardy
Oloko meu..
Essa sua respota fez sacanagem com a board!
new String4; >> Puts griladas!
|
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKKKKKKkk'
Epic !
Re: [ajuda] Erro de Celula -
Don_Speed - 19.06.2012
Tira o new String4 e coloca isso
pawn Код:
if(sscanf(params, "s[e o Tamanho da String]", String4))