26.11.2011, 20:37
This is only the /plate command.
pawn Code:
CMD:plate(playerid, o[])
{
new Float:x,Float:y,Float:z,Float:ang;
GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: You're not in a vehicle!");
ShowPlayerDialog(playerid,2500,DIALOG_STYLE_INPUT,"Vehicle Plate","Input your new vehicle plate below.","Yes","Cancel");
return 1;
}
pawn Code:
// OnDialogRespone
if(dialogid == 2500) {
if(response) {
new Float:x,Float:y,Float:z,Float:ang;
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);
}
}