25.08.2014, 19:46
Nгo testei mais acho que vai dar certo, tenta ai.
Se funcionar й sу acrescentar mais cores.
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;
}