[HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP - 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: [HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP (
/showthread.php?tid=209303)
[HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP -
vakhtang - 10.01.2011
Here is code:
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
new FlameThrower1;
new DeathVehicle1;
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
forward FlameThrowerTimer1();
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
DeathVehicle1 = CreateVehicle(405,-2073.0219726563,-83.703521728516,35.1640625, 0, 158, 158, 60);
FlameThrower1 = CreateObject(14446,0,0,0,0,0,0);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/2", cmdtext, true, 10) == 0)
{
PutPlayerInVehicle(playerid, DeathVehicle1, 0);
return 1;
}
return 0;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))//LEFT_MOUSE
{
if (IsPlayerInVehicle(playerid, DeathVehicle1))
{
AttachObjectToVehicle(FlameThrower1,DeathVehicle1,0.457519535,-2.84314728,-2.20000076,0,0,180);
SetTimer("FlameThrowerTimer1",3000,false);
}
}
return 1;
}
public FlameThrowerTimer1()
{
DestroyObject(FlameThrower1);
}
There are no errors
Re: [HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP -
Lorenc_ - 10.01.2011
Код:
AttachObjectToVehicle(14446,DeathVehicle1,0.457519535,-2.84314728,-2.20000076,0,0,180);
Re: [HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP -
vakhtang - 10.01.2011
That`s right But In Game It Attachs A bed
Re: [HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP -
Lorenc_ - 10.01.2011
then u selected a wrong object id
Re: [HELP] I attached flamethrower in MTA to car but here it attachs a bed ??!! WTF! HELP -
vakhtang - 10.01.2011
Fixed
Thanks