#include <a_samp>
#include <zcmd>
CMD:rendszam(playerid)
{
ShowPlayerDialog(playerid, 8357, DIALOG_STYLE_INPUT,\"Írd be a rendszámot!\",\"Ide írd:\", \"Felhelyez\",\"\");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 8357)
{
if(response == 1)
{
new Float:x,Float:y,Float:z,Float:ang, string[128];
format(string, 128, \" Új rendszám: %s\", inputtext);
SendClientMessage(playerid, 0x0000FFAA, string);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), ang);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid), 0);
SetVehicleZAngle(GetPlayerVehicleID(playerid), ang);
}
}
return 1;
}