SA-MP Forums Archive
colliding - 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)
+--- Thread: colliding (/showthread.php?tid=310324)



colliding - wildcookie007 - 11.01.2012

Alright, this isn't any advanced expert code or something, just trying to detect basically, advanced coding will come after this. So I need your help, I got this code and basically it gives no message:

Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    new Float:dis,Float:dis2,str[128];
	RepairVehicle(GetPlayerVehicleID(playerid));
	ForEach(i,MAX_PLAYERS)
	{
	    if(i != playerid)
	    {
	        dis = 99999.99;
	        dis2 = GetDistanceBetweenVehicles(playerid,i);
	        if(dis2 < dis && dis2 < 8.0)
         	{
		  		if (IsPlayerInAnyVehicle(i))
				{
					if(GetPlayerVehicleID(i) != GetPlayerVehicleID(playerid))
		   			{
		                RepairVehicle(GetPlayerVehicleID(i));
		                format(str,sizeof(str),"Collider : %s",PlayerName2(i));
		                SendClientMessage(playerid,COLOR_WHITE,str);
			        }
		        }
			}
		}
	}
	return 1;
}
Sending a message AFTER everything (in the end) returns id 0 all the time. Any ideas..My head isn't working today


Re: colliding - wildcookie007 - 12.01.2012

bumpty bump. help.


Re: colliding - wildcookie007 - 13.01.2012

HELP.