SA-MP Forums Archive
OnPlayerWeaponShot & Hittype with Fire Extinguisher - 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: OnPlayerWeaponShot & Hittype with Fire Extinguisher (/showthread.php?tid=580406)



OnPlayerWeaponShot & Hittype with Fire Extinguisher - Metharon - 05.07.2015

... i'm trying to make a fireman job , when the player shot on fire object with the fire extinguisher to stop it


Is working with every gun with a crosshair but with the extingguisher is not working ..

( Foc = fire in romanian)
Код:
		for(new id = 0; id < 20; id++)
		{
	 		if(hittype == 4)
	 		{
			    if(hitid == FocObject[playerid][id])
			    {
					
			        if(FireAvailable[playerid][id] == 0)
			        {
						printf("Called 2");
			                        new playa = FireWorkWith[playerid];
					        FocRamas[playerid] --;
					        FocRamas[playa] --;
						FireAvailable[playerid][id] = 1;
						FireAvailable[playa][id] = 1;
		    			        DestroyPlayerObject(playerid, FocObject[playerid][id]);
		    			        DestroyPlayerObject(playa, FocObject[playa][id]);
						if(FocRamas[playerid] < 1)
						{
						    SendClientMessageToAll(-1, "    all fires deleted");
						}
					}
				}
			}
		}
Any way to know when the player shot with extinguisher on fire object ? ..


Re: OnPlayerWeaponShot & Hittype with Fire Extinguisher - SickAttack - 05.07.2015

That callback only works with weapons with bullets.

Get the player's key state and do some checks.


Re: OnPlayerWeaponShot & Hittype with Fire Extinguisher - Metharon - 05.07.2015

How the fuck to check if player is spraying around and the position ... ?


Re: OnPlayerWeaponShot & Hittype with Fire Extinguisher - SickAttack - 05.07.2015

https://sampforum.blast.hk/showthread.php?tid=359640
=> http://pastebin.com/9hAMh8aS