SA-MP Forums Archive
Problem with tune commands: closeto? - 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: Problem with tune commands: closeto? (/showthread.php?tid=144318)



Problem with tune commands: closeto? - GNL - 26.04.2010

Hi,
When i wanted to make a command to tune a car, i wanted that not everybody could use this command, only when you are 5 Cordinates away. I also wanted that you can do this only in a car. How to do this? Its a command, so im not using CreatStaticVehicle ect.


Re: Close to something? - mick88 - 26.04.2010

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: Close to something? - GNL - 26.04.2010

Quote:
Originally Posted by mick88
alright.. but i get a lot of errors with these commands:
Код:
	if(strcmp("/rmodc", cmdtext, true, 10) == 0){
	{
	if(IsPlayerInRangeOfPoint(playerid, 10, 624.9222,-22.8503,1002.0377))
	{
		if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, 0xFFFFFF, "You need to be in a vehicle!");
		ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 3);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
		return 1;
		}
	if(strcmp("/rms", cmdtext, true, 10) == 0){
	{
	if(IsPlayerInRangeOfPoint(playerid, 10, 624.9222,-22.8503,1002.0377))
	{
		if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, 0xFFFFFF, "You need to be in a vehicle!");
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1029);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1030);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1031);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1033);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1139);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1140);
		AddVehicleComponent(GetPlayerVehicleID(playerid), 1084);
		ChangeVehicleColor(GetPlayerVehicleID(playerid), 2,6);
 	}
return 1;



Re: Problem with tune commands: closeto? - GNL - 27.04.2010

Somebody plz?


Re: Problem with tune commands: closeto? - GNL - 28.04.2010

Quote:
Originally Posted by GNL
Somebody plz?
Second bump


Re: Problem with tune commands: closeto? - Geso - 28.04.2010

What are the errors? And please post the lines with it.


Re: Problem with tune commands: closeto? [FIXED] - GNL - 28.04.2010

Fixed it!