/changeplate.
#4

You could mabe use a input style dialog for that, yeah?
at the top
pawn Код:
#define PLATETEXTMENU 1234 //number can be anything not used by your scripts
in your command simply check if the player is in a vehicle & also if they are the driver.
pawn Код:
//changeplate
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" for the "PLATETEXTMENU" simply add...
pawn Код:
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);//
//add your other needed code here....
}
doing it this way you can use stuff like "{000011}Darnell" which would insert your name on the license plate in black, other colours work too

Anyway Hope this helps
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: 3 Guest(s)