[Pedido] Tabela de cores
#4

Cara isso й so para vocк ter uma base, existe diversas formas de criar esse sistema.

Topo do GM
PHP код:
#define DIALOG_PINTAR     0 
Comando usando zcmd
PHP код:
CMD:pinta(playeridparams[])
{
    
#pragma unused params
    
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1"Erro - voce nao esta em um veiculo");
    
    
ShowPlayerDialog(playeridDIALOG_PINTARDIALOG_STYLE_LIST"Pintar Veiculo",
    
"Cor 0\n\
    Cor 1\n\
    Cor 2\n\
    Cor 3\n\
    Cor 4\n\
    Cor 5\n"
,
    
"Ok""");
    return 
1;

// OnDialogResponse
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_PINTAR:
        {
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0:{ChangeVehicleColor(IsPlayerInAnyVehicle(playerid), 00);}
                    case 
1:{ChangeVehicleColor(IsPlayerInAnyVehicle(playerid), 11);}
                    case 
2:{ChangeVehicleColor(IsPlayerInAnyVehicle(playerid), 22);}
                    case 
3:{ChangeVehicleColor(IsPlayerInAnyVehicle(playerid), 33);}
                    case 
4:{ChangeVehicleColor(IsPlayerInAnyVehicle(playerid), 44);}
                    case 
5:{ChangeVehicleColor(IsPlayerInAnyVehicle(playerid), 55);}
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Tabela de cores - by DeusGrego - 30.03.2018, 19:54
Re: Tabela de cores - by Lontresca - 30.03.2018, 19:59
Re: Tabela de cores - by DeusGrego - 30.03.2018, 20:01
Re: Tabela de cores - by Lontresca - 30.03.2018, 20:57
Re: Tabela de cores - by DeusGrego - 30.03.2018, 22:14
Re: Tabela de cores - by Lontresca - 30.03.2018, 22:30
Re: Tabela de cores - by RazorGuigo - 03.04.2018, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)