Guest User

Untitled

a guest
Dec 8th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.89 KB | None | 0 0
  1. CMD:v(playerid, params[])
  2. {
  3.     if (PlayerInfo[playerid][pAdmin] >= 2)
  4.     {
  5.  
  6.         new
  7.             iVehicle,
  8.             iColors[2];
  9.  
  10.         if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1]))
  11.         {
  12.             SendClientMessage(playerid, COLOR_PURPLE, "USAGE: /v [Car ID] [Colour 1] [Colour 2]");
  13.         }
  14.         else if(!(400 <= iVehicle <= 611))
  15.         {
  16.             SendClientMessage(playerid, COLOR_PURPLE, "No Such Vehicle Model (400 - 611)");
  17.         }
  18.         else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255))
  19.         {
  20.             SendClientMessage(playerid, COLOR_PURPLE, "No Such Colour (0 - 255)");
  21.         }
  22.  
  23.         new
  24.             Float: fVehPos[4];
  25.  
  26.         GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
  27.         GetPlayerFacingAngle(playerid, fVehPos[3]);
  28.         CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2]+0.2, fVehPos[3], iColors[0], iColors[1], -1);
  29.         return SendClientMessage(playerid, COLOR_PURPLE, "Your Vehicle Has Spawned!");
  30.     }
  31.     return 1;
  32. }
Add Comment
Please, Sign In to add comment