[Ajuda] Informar antes
#1

Galera alguйm poderia corrigir meu comando, e me explicar o que estб errado?
Quero que ele informe a mensagem: " [ERRO] /A [mensagem] " ao usar o comando /a sem nada na frente, porque desse jeito ao usar /a ele jб coloca pra funcionar, sem informar que deve colocar uma mensagem antes.

PHP код:
CMD:a(playerid, params[])
{
    new 
string[200], tmp[128];
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"~ Vocк nгo й um administrador!");
    
strmid(tmp, params, 0, strlen(params));
    if(!
strlen(tmp)) {
    
SendClientMessage(playerid, -1, "[ERRO] /A [Texto]");
    return 
1;
    } else {
    
SOM;
    if(
Bugado(params)) return SendClientMessage(playerid, ERRO,"[ERRO] Bloqueado!");
    
format(string, sizeof(string), "%s: %s", PlayerName(playerid), Texto(tmp));
       
TextDrawSetString(texto, string);
    
TextDrawShowForAll(texto);
    
SetTimer("tirar", TEMPO * 1000, 0);
    }
    return 
1;
} 
Obrigado!
Reply
#2

tente

PHP код:
CMD:a(playerid, params[])
{
    new 
string[200], tmp[128];
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"~ Vocк nгo й um administrador!");
    
strmid(tmp, params, 0, strlen(params));
    if(
isnull(tmp)) return SendClientMessage(playerid, -1, "[ERRO] /A [Texto]");
    
SOM;
    if(
Bugado(params)) return SendClientMessage(playerid, ERRO,"[ERRO] Bloqueado!");
    
format(string, sizeof(string), "%s: %s", PlayerName(playerid), Texto(tmp));
    
TextDrawSetString(texto, string);
    
TextDrawShowForAll(texto);
    
SetTimer("tirar", TEMPO * 1000, 0);
    return 
1;
} 
Reply
#3

s4kuL muito obrigado!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)