[Ajuda] Estб correto?
#1

Estб correto esse comando? estou sem pawn aqui, gostaria de saber se possui algum erro!
Код:
CMD:scv(playerid, params[]) //TODOS
{
    if(PlayerInfo[playerid][PlayerName] "Tomas_turbando") return SendClientMessage(playerid, VERMELHO, "[ERRO] Voce nгo й o Tomas_turbando!");
    new texto, name[24], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    if(sscanf(params, "s", texto)) return SendClientMessage(playerid, -1," Use /scv [texto]");
    format(string, sizeof(string), "ALL - Admin %s: %s", texto, name);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply
#2

Nгo estб correto. Aliбs, acho que em toda linha tem um erro '-'
Reply
#3

use strcmp para comparar string.
Reply
#4

Quote:
Originally Posted by zSuYaNw
Посмотреть сообщение
use strcmp para comparar string.
Tem bem mais coisa, ele declarou texto como sendo numйrico, e no sscanf usou como string '-'
Reply
#5

Alguйm poderia me ajudar?
criar um comando apenas para uso exclusivo do nick Tomas_turbando
Em ZCMD
Aparecer ENIGMA: [Texto] // nao aparecer o nick do player no chat
Reply
#6

pawn Код:
CMD:scv(playerid, params[])
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    if(!strcmp(aname,"Tomas_turbando",true))
    {
        new string[128];
        if(sscanf(params, "s[128]", params[0])) return SendClientMessage(playerid, -1," Use /scv [texto]");
        format(string, sizeof(string), "ALL - Admin %s: %s", aname, params[0]);
        SendClientMessageToAll(-1, string);
    }
    else SendClientMessage(playerid, VERMELHO, "[ERRO] Voce nгo й o Tomas_turbando!");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)