Code problem
#1

Hey,

I wanna fix my fire command since its not working, pretty much it creates fire objects but I cant seem to get it to put them out here is what I have under the command to create the fires:

Код:
 	fire1 = CreateObject(18691, x+10, y+0, z-1, fax, fay, faz);
   	fire2 = CreateObject(18691, x+10, y+2, z-1, fax, fay, faz);
   	fire3 = CreateObject(18691, x+10, y-2, z-1, fax, fay, faz);
   	fire4 = CreateObject(18691, x+10, y+4, z-1, fax, fay, faz);
   	fire5 = CreateObject(18691, x+10, y-4, z-1, fax, fay, faz);
   	SetTimer("spraycheck", 5000, 1);
Then I have this under the timer:

Код:
	if(GetPlayerCameraFrontVector(playerid, x, y, z) == fire1 && weaponid == 42 || GetPlayerCameraFrontVector(playerid, x, y, z) == fire2 && weaponid == 42 || GetPlayerCameraFrontVector(playerid, x, y, z) == fire3 && weaponid == 42 || GetPlayerCameraFrontVector(playerid, x, y, z) == fire4 && weaponid == 42 || GetPlayerCameraFrontVector(playerid, x, y, z) == fire5 && weaponid == 42)
	{
		if(newkeys & KEY_FIRE)
			{
		    SetTimer("sprayputout", 10000, 1);
		    SendClientMessage(playerid, COLOR_GREEN, "You begin to put out the fire...");
Then under that timer I have:

Код:
	DestroyObject(fire1);
	DestroyObject(fire2);
	DestroyObject(fire3);
	DestroyObject(fire4);
	DestroyObject(fire5);
Why isnt it removing that fire objects once the person sprays them with the extinguisher? Please Help Thanks!
Reply
#2

Come on guys, I only post my questions on SAMP forums because I know someone might be able to help me out...
Reply
#3

Bump - Someone please help me out here!
Reply
#4

Bump come on samp forum please help me out I really need your help :/
Reply
#5

GetPlayerCameraFrontVector(playerid, x, y, z) will never = fire2 or any firex you want the object id
Reply
#6

Same thing no errors but it doesnt work...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)