17.08.2012, 02:07
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid) {
case 15:
{
switch(listitem) {
case 0:
{
ShowPlayerDialog(playerid, 16, DIALOG_STYLE_LIST, "carros simples", "infernus\nrg-500", "Selecionar", "Cancelar");
}
}
}
case 16:
{
switch(listitem) {
case 0:
{
GetPlayerPos(playerid, X, Y, Z);
DestroyVehicle(CarroCriado[playerid]);
CarroCriado[playerid] = CreateVehicle(411, X, Y, Z, 0.0, 3, 3, -1);
PutPlayerInVehicle(playerid, CarroCriado[playerid], 0);
}
case 1:
{
GetPlayerPos(playerid, X, Y, Z);
DestroyVehicle(CarroCriado[playerid]);
CarroCriado[playerid] = CreateVehicle(522, X, Y, Z, 0.0, 3, 3, -1);
PutPlayerInVehicle(playerid, CarroCriado[playerid], 0);
}
}
}
}
return true;
}