/changeplate.
#10

Quote:
Originally Posted by Darnell
Посмотреть сообщение
Lol, well.
I still can't understand what to put in the dialog response so it'll change..As I've told, I'm a new scripter >.<.
Lolz, ya what!

look man everything i put there is basically copy paste-able, an we all started somewhere...

pawn Код:
#define PLATETEXTMENU 1234 //
in your command simply check if the player is in a vehicle & also if they are the driver.
pawn Код:
//changeplate command
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
    ShowPlayerDialog(playerid, PLATETEXTMENU , DIALOG_STYLE_INPUT, "Personal Numberplate", "Insert plate text", "Accept", "Cancel");//
//else don't do anything OR "Sendclientmsg - You must be driving a vehicle"
under "OnDialogResponse" simply add...
pawn Код:
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == PLATETEXTMENU)
    {
        if(response)
        {
            new Float:vx, Float:vy, Float:vz, Float:vang;//
            GetVehiclePos(GetPlayerVehicleID(playerid), vx ,vy, vz);//
            GetVehicleZAngle(GetPlayerVehicleID(playerid), vang);//
            SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);//
            SetVehicleToRespawn(GetPlayerVehicleID(playerid));//
            SetVehiclePos(GetPlayerVehicleID(playerid), vx, vy, vz);//
            PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);//
            SetVehicleZAngle(GetPlayerVehicleID(playerid), vang);//
        }
        else//they select cancel
        {
            return 1;//do nothing...
        }
    }
    return 0;
Goodluck!
Reply


Messages In This Thread
/changeplate. - by Darnell - 14.08.2011, 09:49
Re: /changeplate. - by KingTurtle - 14.08.2011, 10:49
Re: /changeplate. - by Darnell - 14.08.2011, 11:10
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 05:50
Re: /changeplate. - by Darnell - 15.08.2011, 06:00
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 06:14
Re: /changeplate. - by Darnell - 15.08.2011, 06:17
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 06:29
Re: /changeplate. - by Darnell - 15.08.2011, 06:34
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 06:53

Forum Jump:


Users browsing this thread: 5 Guest(s)