10.01.2011, 09:46
Here is code:
There are no errors
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);
}