Connorlolz

.

Jul 4th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.70 KB | None | 0 0
  1. #define VEH             (13)
  2.  
  3. CMD:veh(playerid, params[])
  4. {
  5.     if(PVar[playerid][AdminLevel] >= 1)
  6.     {
  7.         ShowPlayerDialog(playerid, VEH, DIALOG_STYLE_INPUT, "Vehicle Dialog", "Select a Vehicle", "Okay", "Cancel");
  8.     }
  9.     else return 1;
  10.     return 1;
  11. }
  12.  
  13. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  14. {
  15.     if(dialogid == 13)
  16.     {
  17.             new vehid;
  18.         vehid = strval(inputtext);
  19.         if(vehid > 400 || vehid < 611)
  20.         {
  21.                 new Float:x, Float:y, Float:z;
  22.             GetPlayerPos(playerid, x, y, z);
  23.             CreateVehicle(vehid, x, y, z, 0, 0, 0, 0);
  24.             PutPlayerInVehicle(playerid, vehid, 0);
  25.             SendClientMessage(playerid, WHITE, "The vehicle has been spawned.");
  26.         }
  27.     }
  28.     return 1;  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment