29.10.2012, 22:01
PHP код:
#include <a_samp>
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_SECONDARY_ATTACK))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 627.4248, -571.8760, 17.8942))
{
SetPlayerPos(playerid, -322.197998,302.497985,999.148437);
SetPlayerInterior(playerid, 5);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,2.0, -322.197998,302.497985,999.148437))
{
SetPlayerPos(playerid, 627.4248, -571.8760, 17.8942);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
}
}
return 1;
}