Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define VEH (13)
- CMD:veh(playerid, params[])
- {
- if(PVar[playerid][AdminLevel] >= 1)
- {
- ShowPlayerDialog(playerid, VEH, DIALOG_STYLE_INPUT, "Vehicle Dialog", "Select a Vehicle", "Okay", "Cancel");
- }
- else return 1;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 13)
- {
- new vehid;
- vehid = strval(inputtext);
- if(vehid > 400 || vehid < 611)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- CreateVehicle(vehid, x, y, z, 0, 0, 0, 0);
- PutPlayerInVehicle(playerid, vehid, 0);
- SendClientMessage(playerid, WHITE, "The vehicle has been spawned.");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment