[ajuda] Setplayercolor
#1

pawn Код:
if(strcmp(cmd, "/nick", true) == 0)
{
new cor1;
tmp = strtok(cmdtext, idx);
cor1 = strval(tmp);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho,"USE: /nick [cor]");
return 1;}
SetPlayerColor(playerid,cor1);
SendClientMessage(playerid,0x00FF7FAA, "[INFO] Cor do Nick com sucesso!");
return 1;}
}
Galera estou tentando fazer do comando /pintar [cor1] [cor2] o comando /nick [cor]
Para q mude a cor do nick mais quando vou compilar da um problema no compilador me ajuda por favor
Reply
#2

if(strcmp(cmd, "/nick", true) == 0)
{
new cor1;
new cor2;
tmp = strtok(cmdtext, idx);
cor1 = strval(tmp);
cor2 = strval(tmp);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho,"USE: /nick [cor1] [cor2]");
return 1;}
SetPlayerColor(playerid,cor1);
SetPlayerColor(playerid,cor2);
SendClientMessage(playerid,0x00FF7FAA, "[INFO] Cor do Nick com sucesso!");
return 1;}
}
Reply
#3

Manow agr so muda pra cor Preto
Reply
#4

pawn Код:
if(strcmp(cmd, "/nick", true) == 0)
{
    new cor1,cor2;
    new string[128];
    cor1 = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, Vermelho, "/nick [cor1] [cor2]");
        return 1;
    }
    cor2 = strval(tmp);
    SetPlayerColor(playerid,cor1,cor2);
    format(string, sizeof(string), "(INFO) Cores Alteradas para [%d] e [%d].", cor1, cor2);
    SendClientMessage(playerid, -1, string);
    return 1;
}
tenta ..
Reply
#5

mesma coisa
Reply
#6

Ps:nгo testei

pawn Код:
if(strcmp(cmd, "/nick", true, 4))
{
    if(!cmdtext[6])
        return SendClientMessage(playerid, Vermelho,"USE: /nick [cor]");
       
    SetPlayerColor(playerid, strval(cmdtext[6]));
    SendClientMessage(playerid,0x00FF7FAA, "[INFO] Cor do Nick com sucesso!");
    return 1;
}
Reply
#7

se tens essa duvida, й pq ainda n sabes mt bem trabalhar com "strtok"

"Quem Comeзa pelo Topo, Ao topo Nunca Hб-de Chegar"
Reply
#8

Quote:
Originally Posted by andmeida10
Посмотреть сообщение
se tens essa duvida, й pq ainda n sabes mt bem trabalhar com "strtok"

"Quem Comeзa pelo Topo, Ao topo Nunca Hб-de Chegar"
Ouзa a Voz Da Experiencia
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)