Code problem - 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: Code problem (
/showthread.php?tid=239127)
Code problem -
Tommy_Mandaz - 12.03.2011
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!
Re: Code Support -
Tommy_Mandaz - 12.03.2011
Come on guys, I only post my questions on SAMP forums because I know someone might be able to help me out...
Re: Code problem -
Tommy_Mandaz - 13.03.2011
Bump - Someone please help me out here!
Re: Code problem -
Tommy_Mandaz - 13.03.2011
Bump come on samp forum please help me out I really need your help :/
Re: Code problem -
(SF)Noobanatior - 13.03.2011
GetPlayerCameraFrontVector(playerid, x, y, z) will never = fire2 or any firex you want the object id
Re: Code problem -
Tommy_Mandaz - 13.03.2011
Same thing no errors but it doesnt work...