Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:v(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- new
- iVehicle,
- iColors[2];
- if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1]))
- {
- SendClientMessage(playerid, COLOR_PURPLE, "USAGE: /v [Car ID] [Colour 1] [Colour 2]");
- }
- else if(!(400 <= iVehicle <= 611))
- {
- SendClientMessage(playerid, COLOR_PURPLE, "No Such Vehicle Model (400 - 611)");
- }
- else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255))
- {
- SendClientMessage(playerid, COLOR_PURPLE, "No Such Colour (0 - 255)");
- }
- new
- Float: fVehPos[4];
- GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
- GetPlayerFacingAngle(playerid, fVehPos[3]);
- CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2]+0.2, fVehPos[3], iColors[0], iColors[1], -1);
- return SendClientMessage(playerid, COLOR_PURPLE, "Your Vehicle Has Spawned!");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment