SA-MP Forums Archive
[Pedido] mudar placa - 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: [Pedido] mudar placa (/showthread.php?tid=533670)



mudar placa - AssasinoLM - 25.08.2014

ola pessoal ja tenho um codigo de mudar placa mais queria colocar com cor alguйm saberia me dizer como faзo isso?

Код:
	if(strcmp(cmd, "/mudarplaca", true) == 0){
		if(PlayerInfo[playerid][pAdmin] >= 3){
		    if (GetPlayerVehicleSeat(playerid) == 0){
				ShowPlayerDialog (playerid, 5000, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite SUA Placa:\n\nMaximo de 8 Caracteres", "Change", "Cancelar");
			}else SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar em um veiculo");
		}
	    return 1;
	}



Re: mudar placa - FallweN - 25.08.2014

Nгo testei mais acho que vai dar certo, tenta ai.

pawn Код:
if(strcmp(cmd, "/mudarplaca", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if (GetPlayerVehicleSeat(playerid) == 0)
        {
            ShowPlayerDialog (playerid, 5000, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite SUA Placa:\n\nMaximo de 8 Caracteres", "Change", "Cancelar");
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar em um veiculo");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Placa;
    switch(dialogid)
    {
        case 5000:
        {
            Placa = inputtext;
            ShowPlayerDialog(playerid, 5001, DIALOG_STYLE_LIST, "Cor", "Vermelho\nVerde\nAzul", "Confirmar", "Sair");
        }
        case 5001:
        {
            switch(listitem)
            {
                case 0: SetVehicleNumberPlate(vehicleid, "{FF0000}%s", Placa);
               
                case 1: SetVehicleNumberPlate(vehicleid, "{00FF00}%s", Placa);
               
                case 2: SetVehicleNumberPlate(vehicleid, "{0000FF}%s", Placa);
            }
        }
    }
    return true;
}
Se funcionar й sу acrescentar mais cores.


Re: mudar placa - AssasinoLM - 29.08.2014

Quote:
Originally Posted by FallweN
Посмотреть сообщение
Nгo testei mais acho que vai dar certo, tenta ai.

pawn Код:
if(strcmp(cmd, "/mudarplaca", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if (GetPlayerVehicleSeat(playerid) == 0)
        {
            ShowPlayerDialog (playerid, 5000, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite SUA Placa:\n\nMaximo de 8 Caracteres", "Change", "Cancelar");
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Vocк precisa estar em um veiculo");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Placa;
    switch(dialogid)
    {
        case 5000:
        {
            Placa = inputtext;
            ShowPlayerDialog(playerid, 5001, DIALOG_STYLE_LIST, "Cor", "Vermelho\nVerde\nAzul", "Confirmar", "Sair");
        }
        case 5001:
        {
            switch(listitem)
            {
                case 0: SetVehicleNumberPlate(vehicleid, "{FF0000}%s", Placa);
               
                case 1: SetVehicleNumberPlate(vehicleid, "{00FF00}%s", Placa);
               
                case 2: SetVehicleNumberPlate(vehicleid, "{0000FF}%s", Placa);
            }
        }
    }
    return true;
}
Se funcionar й sу acrescentar mais cores.
entгo amigo gostaria nгo de add cor mais as que ja tem no samp tipo 0 e preto 1 e branco ... teria como?


Re: mudar placa - Spectral - 29.08.2014

Quote:
Originally Posted by AssasinoLM
Посмотреть сообщение
entгo amigo gostaria nгo de add cor mais as que ja tem no samp tipo 0 e preto 1 e branco ... teria como?
Essa forma de cores sу funcionam para setar a cor de veнculos.
Nгo funciona para letras, que utilizam cores em hexadecimal.