11.05.2011, 22:28
PHP код:
#include <a_samp>
#define FILTERSCRIPT2
#if defined FILTERSCRIPT2
new kArmadilha[ 4 ];
new kAr;
public OnFilterScriptInit()
{
kArmadilha[ 0 ] = CreateObject( 971, 1483.99035645, -1688.18383789, 6.69180536, 0.00000000, 0.00000000,270.00000000 ); //object(subwaygate) (1)
kArmadilha[ 1 ] = CreateObject( 971, 1479.60742188, -1683.69921875, 6.69179153, 0.00000000, 0.00000000,0.00000000 ); //object(subwaygate) (2)
kArmadilha[ 2 ] = CreateObject( 971, 1475.35778809, -1688.19116211, 6.59178734, 0.00000000, 0.00000000, 270.00000000 ); //object(subwaygate) (3)
kArmadilha[ 3 ] = CreateObject( 971, 1479.76416016, -1692.57788086, 6.56682682, 0.00000000, 0.00000000, 180.00000000 ); //object(subwaygate) (4)
kArm = CreatePickup( 1242, 2, 1480.4371337891, -1687.8758544922, 13.471883773804 );
return true;
}
public OnFilterScriptExit() { return true; }
#else
#endif
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( !strcmp(cmdtext, "/armadilha2", true ) )
{
MoveObject( kArmadilha[ 0 ], 1483.99035645, -1688.18383789, 6.69180536, 3 );
MoveObject( kArmadilha[ 1 ], 1479.60742188, -1683.69921875, 6.69179153, 3 );
MoveObject( kArmadilha[ 2 ], 1475.35778809, -1688.19116211, 6.59178734, 3 );
MoveObject( kArmadilha[ 3 ], 1479.76416016, -1692.57788086, 6.56682682, 3 );
SendClientMessage( playerid, 0x0000000F, "Armadilha desarmada" );
return true;
}
return false;
}
public OnPlayerPickUpPickup( playerid, pickupid )
{
if( pickupid == kArm )
{
MoveObject( kArmadilha[ 0 ], 1483.99035645, -1688.18383789, 16.566783905029, 3 );
MoveObject( kArmadilha[ 1 ], 1479.60742188, -1683.69921875, 16.566783905029, 3 );
MoveObject( kArmadilha[ 2 ], 1475.35778809, -1688.19116211, 16.566783905029, 3 );
MoveObject( kArmadilha[ 3 ], 1479.76416016, -1692.57788086, 16.566783905029, 3 );
return true;
}
return true;
}