10.01.2011, 13:56
fixed here is the code
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
new FighterSentinelMinigun1;
new FighterSentinelRocketLeft1;
new FighterSentinelRocketRight1;
new FighterSentinelPetrol1;
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);
FighterSentinelMinigun1 = CreateObject(2985,0,0,0,0.0,0.0,0,300.0);
AttachObjectToVehicle(FighterSentinelMinigun1,DeathVehicle1,0.1491699219,0.999198913575,-0.242923736572,70,3,90);
FighterSentinelRocketLeft1 = CreateObject(1636,0,0,0,0.0,0.0,0,300.0);
FighterSentinelRocketRight1 = CreateObject(1636,0,0,0,0.0,0.0,0,300.0);
FighterSentinelPetrol1 = CreateObject(1650,0,0,0,0.0,0.0,0,300.0);
AttachObjectToVehicle(FighterSentinelRocketLeft1,DeathVehicle1,-0.3991699219,-0.121231079101,0.862998962402,0,0,0);
AttachObjectToVehicle(FighterSentinelRocketRight1,DeathVehicle1,0.3928222656,-0.121231079101,0.862998962402,0,0,0);
AttachObjectToVehicle(FighterSentinelPetrol1,DeathVehicle1,-1.0434570312,-2.201751708984,0.106662750244,0,0,90);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
new Float:x1, Float:y1, Float:z1;
GetPlayerPos(playerid,x1,y1,z1);
if (GetPlayerPos(playerid,x1,y1,z1) && GetPlayerVehicleID(DeathVehicle1))
{
DestroyObject(FlameThrower1);
return 1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/2", cmdtext, true, 10) == 0)
{
PutPlayerInVehicle(playerid, DeathVehicle1, 0);
return 1;
}
if (strcmp("/3", cmdtext, true, 10) == 0)
{
FlameThrower1 = CreateObject(18694,0,0,0,0.0,0.0,0,300.0);
AttachObjectToVehicle(FlameThrower1,DeathVehicle1,0.457519535,-2.84314728,-2.20000076,0,0,180);
SetTimer("FlameThrowerTimer1",3000,false);
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))//FIRE
{
if (IsPlayerInVehicle(playerid, DeathVehicle1))
{
FlameThrower1 = CreateObject(18694,0,0,0,0.0,0.0,0,300.0);
AttachObjectToVehicle(FlameThrower1,DeathVehicle1,0.457519535,-2.84314728,-2.20000076,0,0,180);
SetTimer("FlameThrowerTimer1",3000,false);
}
}
/*if (PRESSED(KEY_ACTION))//TAB
{
if (IsPlayerInVehicle(playerid, DeathVehicle1))
{
DestroyObject(FlameThrower1);
}
}
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 OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
public FlameThrowerTimer1()
{
DestroyObject(FlameThrower1);
}