[FilterScript] SISTEMA DE COR PARA O NICK | 2.0
#1

SISTEMA DE COR PARA O NICK | 2.0

Bom galera,quando postei a primeira versгo falei que estava desenvolvendo uma versгo com mais cores,bom a primeira sу tinha 7,essa tem 21 entгo espero que gostem
DOWNLOAD PASTEBIN:
http://pastebin.com/xXgV4fk7
DOWNLOAD:
PHP Code:
/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|SISTEMA DE COR DO NICK| v.2.0-=-=-=-=-=-=-=-=-=-=-=-==-=-= 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|By: CloneZPlays|-=-=-=-=-=-=-=-=-=-=-=-==-=-==-==-= 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 
#include <a_samp> 
#define FILTERSCRIPT 
//Cores 
#define COLOR_YELLOW 0xFFFF00FF 
#if defined FILTERSCRIPT 
//Variбveis 
new string[256]; 
public 
OnFilterScriptInit() 
{
     
    print(
"====================================="); 
    print(
"=========-=BY: CloneZPlays=-========="); 
    print(
"====================================="); 
    return 
1

public 
OnFilterScriptExit() 
{
     
    return 
1

public 
OnPlayerConnect(playerid
{
     
    return 
1

//Comandos 
public OnPlayerCommandText(playeridcmdtext[]) 
{
     
    if (
strcmp("/cores"cmdtexttrue10) == 0
    {
         
        new 
Creditos[200];// <<< Ta Crйditos pq й do meu GM o dialog,mais nгo muda em nada 
        
strins(Creditos,"{FF0000}/VERMELHO    {0000FF}/AZUL    {00FF00}/VERDE    {FFFF00}/AMARELO    {000000}/PRETO    {FFFFFF}/BRANCO    {FF1493}/ROSA\n",strlen(Creditos)); 
        
strins(Creditos,"{BEBEBE}/CINZA    {8B4513}/MARROM    {A020F0}/ROXO    {00FFFF}/CIANO    {FF8C00}/LARANJA    {EE82EE}/VIOLETA    {EEC900}/DOURADO\n",strlen(Creditos)); 
        
strins(Creditos,"{8B0000}/VERMELHOESCURO    {00008B}/AZULESCURO    {228B22}/VERDEESCURO    {CDCD00}/AMARELOESCURO    {FF3030}/VERMELHOCLARO    {6495ED}/AZULCLARO    {7CFC00}/VERDECLARO\n",strlen(Creditos)); 
        
ShowPlayerDialog(playerid,224DIALOG_STYLE_MSGBOX"{00FF00}CORES BY: {FFFFFF}CloneZPlays",Creditos"OK"""); 
        return 
1
    } 
    if (
strcmp(cmdtext"/verdeclaro"true)==0
    {
         
        
SetPlayerColor(playerid0x7CFC00FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {7CFC00}/VERDECLARO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/azulclaro"true)==0
    {
         
        
SetPlayerColor(playerid0x6495EDFF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {6495ED}/AZULCLARO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/vermelhoclaro"true)==0
    {
         
        
SetPlayerColor(playerid0xFF3030FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {FF3030}/VERMELHOCLARO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/amareloescuro"true)==0
    {
         
        
SetPlayerColor(playerid0xCDCD00FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {CDCD00}/AMARELOESCURO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/verdeescuro"true)==0
    {
         
        
SetPlayerColor(playerid0x228B22FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {228B22}/VERDEESCURO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/azulescuro"true)==0
    {
         
        
SetPlayerColor(playerid0x00008BFF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {00008B}/AZULESCURO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/vermelhoescuro"true)==0
    {
         
        
SetPlayerColor(playerid0x8B0000FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {8B0000}/VERMELHOESCURO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/dourado"true)==0
    {
         
        
SetPlayerColor(playerid0xEEC900FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {EEC900}/DOURADO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/violeta"true)==0
    {
         
        
SetPlayerColor(playerid0xEE82EEFF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {EE82EE}/VIOLETA {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/laranja"true)==0
    {
         
        
SetPlayerColor(playerid0xFF8C00FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {FF8C00}/LARANJA {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/ciano"true)==0
    {
         
        
SetPlayerColor(playerid0xA020F0FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {00FFFF}/CIANO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/roxo"true)==0
    {
         
        
SetPlayerColor(playerid0xA020F0FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {A020F0}/MARROM {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/marrom"true)==0
    {
         
        
SetPlayerColor(playerid0x8B4513FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {8B4513}/MARROM {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/cinza"true)==0
    {
         
        
SetPlayerColor(playerid0xBEBEBEFF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {BEBEBE}/CINZA {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/azul"true)==0
    {
         
        
SetPlayerColor(playerid0x0000FFFF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {0000FF}/AZUL {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/vermelho"true)==0
    {
         
        
SetPlayerColor(playerid0xFF0000FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {FF0000}/VERMELHO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/verde"true)==0
    {
         
        
SetPlayerColor(playerid0x00FF00FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {00FF00}/VERDE {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/amarelo"true)==0
    {
         
        
SetPlayerColor(playerid0xFFFF00FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {FFFF00}/AMARELO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/branco"true)==0
    {
         
        
SetPlayerColor(playerid0xFFFFFFFF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {FFFFFF}/BRANCO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/preto"true)==0
    {
         
        
SetPlayerColor(playerid0x000000FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {000000}/PRETO {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    if (
strcmp(cmdtext"/rosa"true)==0
    {
         
        
SetPlayerColor(playerid0xFF1493FF); 
        new 
pname[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 
        
format(stringsizeof(string), "%s {FFFFFF}Mudou a Cor do seu Nick para {FF1493}/ROSA {FFFF00}Mude vocк tambйm! {9370DB}[/CORES]"pname); 
        
SendClientMessageToAll(COLOR_YELLOWstring); 
        return 
1
    } 
    
//============================================================================== 
    
return 0

//============================================================================== 
#endif 
*Se quiserem pode adicionar mais cores
*Se quiserem pode postar no seu blog,Mais tem que ter os crйditos!!
Reply
#2

Nгo testei mais pelo cуdigo parece estб уtimo .
10/10
Reply
#3

Legal man ! Util . e tambem й bom pra quem nao sabe , estudar esses Code
Reply
#4

Muito bбsico.
Reply
#5

Para deixar o seu code indentado passe por aqui:

http://tabulador.medianewsonline.com/
Reply
#6

@IFoox
Arrumei,IFoox,obrigado por falar.
Reply
#7

Alem de simples esta muito mal otimizado

isso tudo poderia estar resumido a 1 comando por exemplo e nao usar variaveis que nao sao precisas.
Reply
#8

@PT
Sim,na Prуxima vou procurar melhorar em cada aspecto.
Reply
#9

Ficou bom,mais acho que em dialog ficaria melhor.
Reply
#10

Estude um pouco mais amigo. Recomendo vocк usar ZCMD/YCMD e SSCANF...

pawn Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define FILTERSCRIPT

#define TOTAL_CORES 4

new Cores[TOTAL_CORES] = {
    0xFFFFFFFF, //[0] Branco        - 1
    0xFF0000FF, //[1] Vermelho      - 2
    0x00FF00FF, //[2] Verde Claro   - 3
    0xFF8000FF, //[3] Laranja       - 4
};

new NomeCores[TOTAL_CORES][] = {
    "Branco",
    "Vermelho",
    "Verde Claro",
    "Laranja"
};

CMD:idcores(playerid)
{
    new StringZin[128];
    for(new i = 0; i < TOTAL_CORES; ++i)
    {
        format(StringZin, sizeof(StringZin), "[ID: %d]: %s", i, NomeCores[i]);
        SendClientMessage(playerid, Cores[i], StringZin);
    }
    return 1;
}

CMD:setcor(playerid, params[])
{
    new ID_Cor, StringBucNic[128];
    if(sscanf(params, "d", ID_Cor)) return SendClientMessage(playerid, Cores[1], "[ERRO] Use: /setcor [ID]");
    if(ID_Cor == TOTAL_CORES) return SendClientMessage(playerid, Cores[1], "[ERRO]: ID Invбlido, veja em /idcores");
    SetPlayerColor(playerid, Cores[ID_Cor]);
    format(StringBucNic, sizeof(StringBucNic), "[INFO]: Cor modificada para %s com sucesso.", NomeCores[ID_Cor]);
    SendClientMessage(playerid, GetPlayerColor(playerid), StringBucNic);
    return 1;
}
Estude o cуdigo acima ^, fiz em uns 5 minutos...
Acho que esse script que vocк postou й um dos primeiros, estгo parabйns.
O que vale й a intenзгo, a forзa de vontade
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)