Command /paintjob & save paintjob
#4

Here's mine
Код:
CMD:colourcar(playerid, params[]) {
	if(jobVariables[playerVariables[playerid][pJob]][jJobType] == 3) {

		new
			colors[2],
			Float: soPos[3],
			vehicleID = GetPlayerVehicleID(playerid);

		if(sscanf(params, "dd", colors[0], colors[1])) {
			return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/colourcar [colour 1] [colour 2]");
		}
		else if(vehicleID) {
			if(playerVariables[playerid][pJobDelay] == 0) { // DELAY!1
				if(GetPlayerSpeed(playerid, 0) == 0) {
					if(colors[0] >= 0 && colors[0] < 256 && colors[1] >= 0 && colors[1] < 256) {

						GetVehiclePos(vehicleID, soPos[0], soPos[1], soPos[2]);
						PlayerPlaySoundEx(1134, soPos[0], soPos[1], soPos[2]);

						ChangeVehicleColor(vehicleID, colors[0], colors[1]);

						foreach(Player, v) {
							if(playerVariables[v][pCarID] == vehicleID) {
								playerVariables[v][pCarColour][0] = colors[0];
								playerVariables[v][pCarColour][1] = colors[1];
							}
						}
						SendClientMessage(playerid, COLOR_WHITE, "You have resprayed your vehicle.");
						playerVariables[playerid][pJobDelay] = 60;
					}
					else SendClientMessage(playerid, COLOR_WHITE, "Valid vehicle colours are 0 to 255.");
				}
				else SendClientMessage(playerid, COLOR_WHITE, "You must stop your vehicle first.");
			}
			else SendClientMessage(playerid, COLOR_WHITE, "Please wait your job reload time.");
		}
	}
	return 1;
}
have to alter it to your needs.
Reply


Messages In This Thread
Command /paintjob & save paintjob - by CaTaLinU - 20.01.2012, 18:38
Re: Command /paintjob & save paintjob - by BleverCastard - 20.01.2012, 18:42
Re: Command /paintjob & save paintjob - by CaTaLinU - 20.01.2012, 18:44
Re: Command /paintjob & save paintjob - by BleverCastard - 20.01.2012, 18:46
Re: Command /paintjob & save paintjob - by CaTaLinU - 20.01.2012, 19:25
Re: Command /paintjob & save paintjob - by BleverCastard - 20.01.2012, 19:30
Re: Command /paintjob & save paintjob - by CaTaLinU - 20.01.2012, 19:40
Re: Command /paintjob & save paintjob - by Bogdan1992 - 20.01.2012, 19:44
Re: Command /paintjob & save paintjob - by BleverCastard - 20.01.2012, 19:55

Forum Jump:


Users browsing this thread: 1 Guest(s)