SA-MP Forums Archive
[ajuda] Setplayercolor - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [ajuda] Setplayercolor (/showthread.php?tid=310736)



[ajuda] Setplayercolor - FriendrS - 13.01.2012

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



Re: [ajuda] Setplayercolor - jeanmon357 - 13.01.2012

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;}
}


Re: [ajuda] Setplayercolor - FriendrS - 13.01.2012

Manow agr so muda pra cor Preto


Re: [ajuda] Setplayercolor - dPlaYer_ - 13.01.2012

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 ..


Re: [ajuda] Setplayercolor - FriendrS - 13.01.2012

mesma coisa


Re: [ajuda] Setplayercolor - Ivonete - 13.01.2012

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;
}



Re: [ajuda] Setplayercolor - andmeida10 - 13.01.2012

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

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


Re: [ajuda] Setplayercolor - Don_Speed - 13.01.2012

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