Guest User

Untitled

a guest
Sep 18th, 2010
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.08 KB | None | 0 0
  1. CMD:veh(playerid, params[])
  2. {
  3.     if(IsPlayerConnected(playerid))
  4.     {
  5.         new
  6.             cID,
  7.             c1,
  8.             c2;
  9.         if (PlayerInfo[playerid][pAdmin] < 2)
  10.         {
  11.             SendClientMessage(playerid, COLOR_GRAD1, "   Nemate ovlasti koristiti to!");
  12.             return 1;
  13.         }
  14.         if(sscanf(params, "ddd", cID, c1, c2)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
  15.         if(cID < 400 || cID > 611) { SendClientMessage(playerid, COLOR_GREY, "   Vehicle Number can't be below 400 or above 611 !"); return 1; }
  16.         if(c1 < 0 || c1 > 126) { SendClientMessage(playerid, COLOR_GREY, "   Color Number can't be below 0 or above 126 !"); return 1; }
  17.         if(c2 < 0 || c2 > 126) { SendClientMessage(playerid, COLOR_GREY, "   Color Number can't be below 0 or above 126 !"); return 1; }
  18.         new Float:X,Float:Y,Float:Z;
  19.         GetPlayerPos(playerid, X,Y,Z);
  20.         new carid = CreateVehicle(cID, X,Y,Z, 0.0, c1, c2, 60000);
  21.         CreatedCars[CreatedCar] = carid;
  22.         CreatedCar ++;
  23.         format(string, sizeof(string), "   Vehicle %d spawned.", carid);
  24.         SendClientMessage(playerid, COLOR_GREY, string);
  25.     }
  26.     return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment