Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:veh(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new
- cID,
- c1,
- c2;
- if (PlayerInfo[playerid][pAdmin] < 2)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Nemate ovlasti koristiti to!");
- return 1;
- }
- if(sscanf(params, "ddd", cID, c1, c2)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
- if(cID < 400 || cID > 611) { SendClientMessage(playerid, COLOR_GREY, " Vehicle Number can't be below 400 or above 611 !"); return 1; }
- if(c1 < 0 || c1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; }
- if(c2 < 0 || c2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; }
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- new carid = CreateVehicle(cID, X,Y,Z, 0.0, c1, c2, 60000);
- CreatedCars[CreatedCar] = carid;
- CreatedCar ++;
- format(string, sizeof(string), " Vehicle %d spawned.", carid);
- SendClientMessage(playerid, COLOR_GREY, string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment