15.08.2011, 06:53
Quote:
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 >.<. |
look man everything i put there is basically copy paste-able, an we all started somewhere...
pawn Код:
#define PLATETEXTMENU 1234 //
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"
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;