SA-MP Forums Archive
How do i make a vehicle repair to full? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do i make a vehicle repair to full? (/showthread.php?tid=104103)



How do i make a vehicle repair to full? - Sampiscool123 - 22.10.2009

hi i was wondering if anyone could send me a script/code that makes the whole of the vehicle repair including the body of the vehicle. please help

thanks


Re: How do i make a vehicle repair to full? - Pawno_Master - 22.10.2009

search on wiki samp or look at a filterscript i could tell you tomorrow if you can't find


Re: How do i make a vehicle repair to full? - Sampiscool123 - 22.10.2009

nevermind i found it! sorry for posting a topic without reading wiki


Re: How do i make a vehicle repair to full? - Imran.Abbas - 22.10.2009

Sometime i also will come for help hehe, okay dont mind if you got errors because im new Scripter


if you want this cmd , it will teleport to Pay N spary , after that They will give you New Body and colour Enjoy my First Fs hehehehehe
Code:
	if(strcmp(cmdtext, "/fullrepair", true) == 0)
	{
	  		new vehicleid = GetPlayerVehicleID(playerid);
			new Float:X, Float:Y, Float:Z, Float:Angle;
			GetVehiclePos(vehicleid, X, Y, Z);
			GetVehicleZAngle(vehicleid, Angle);
			SetVehiclePos(vehicleid, 2067.7327,-1831.5408,13.2523);
			SetCameraBehindPlayer(playerid);
			SetVehicleZAngle(vehicleid, 185.7243);
			GameTextForPlayer(playerid, "~g~~h~~h~Repairing...", 3500, 5);
			SetTimerEx("ReplaceVehicle", 3000, 0, "iffff", vehicleid, X, Y, Z, Angle);
		}
		else return SendClientMessage(playerid,COLOR_RED, "You're not in a vehicle.");
		return 1;
	}



Re: How do i make a vehicle repair to full? - Peter_Corneile - 22.10.2009

Quote:
Originally Posted by Sampiscool123
nevermind i found it! sorry for posting a topic without reading wiki
I hope their wont be a need for asking sorry next time


Re: How do i make a vehicle repair to full? - Imran.Abbas - 22.10.2009

Quote:
Originally Posted by Sampiscool123
nevermind i found it! sorry for posting a topic without reading wiki
Eek okay ;/ i waste my time to Write this all ...................................

See Wiki before asking something dont be like me


Re: How do i make a vehicle repair to full? - Peter_Corneile - 22.10.2009

Quote:
Originally Posted by D0n_With_Mafia_Skills
Sometime i also will come for help hehe, okay dont mind if you got errors because im new Scripter


if you want this cmd , it will teleport to Pay N spary , after that They will give you New Body and colour Enjoy my First Fs hehehehehe
Code:
	if(strcmp(cmdtext, "/fullrepair", true) == 0)
	{
	  		new vehicleid = GetPlayerVehicleID(playerid);
			new Float:X, Float:Y, Float:Z, Float:Angle;
			GetVehiclePos(vehicleid, X, Y, Z);
			GetVehicleZAngle(vehicleid, Angle);
			SetVehiclePos(vehicleid, 2067.7327,-1831.5408,13.2523);
			SetCameraBehindPlayer(playerid);
			SetVehicleZAngle(vehicleid, 185.7243);
			GameTextForPlayer(playerid, "~g~~h~~h~Repairing...", 3500, 5);
			SetTimerEx("ReplaceVehicle", 3000, 0, "iffff", vehicleid, X, Y, Z, Angle);
		}
		else return SendClientMessage(playerid,COLOR_RED, "You're not in a vehicle.");
		return 1;
	}
By the way does that code take you to a pay n spray ?


Re: How do i make a vehicle repair to full? - kman - 22.10.2009

you have to setvehiclehealth


Re: How do i make a vehicle repair to full? - Peter_Corneile - 22.10.2009

I think what he did was that the guy teleports to a pay n spray and comes back where he was after getting resprayed


Re: How do i make a vehicle repair to full? - Streetplaya - 22.10.2009

Use 0.3's RepairVehicle(vehicleid);