Tessék.
#include <a_samp>
#define DIALOG_LICENSEPLATE 5439
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(\"/rendszám\", cmdtext, true))
{
ShowPlayerDialog(playerid,DIALOG_LICENSEPLATE,DIALOG_STYLE_INPUT,\"Írd be a rendszámot!\",\"Firkáld be ide:\", \"Uzsgyi!\",\"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LICENSEPLATE)
{
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;
}