What is wrong with it?
#1

I made a cmd which it appears the box you write anything you want for change the vehicle plate.
The box appears to write input, but after this, the vehicle doesn't respawn. So the plate doesn't change.
Is anything wrong
pawn Код:
CMD:vplate(playerid, params[])
{
    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: {FFFFFF}You're not in a vehicle!");
    ShowPlayerDialog(playerid,5,DIALOG_STYLE_INPUT,"{FFFFFF}Vehicle Plate","{FFFF00}Input the vehicle plate you want below.","Yes","Cancel");
    return 1;
}
pawn Код:
if(dialogid == 5) {
        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);
        }
    }
Reply


Messages In This Thread
What is wrong with it? - by Kostas' - 01.11.2011, 13:54
Re: What is wrong with it? - by IstuntmanI - 01.11.2011, 14:01
Re: What is wrong with it? - by [L3th4l] - 01.11.2011, 14:01
Re: What is wrong with it? - by Kostas' - 01.11.2011, 14:10

Forum Jump:


Users browsing this thread: 2 Guest(s)