13.07.2011, 19:28
Quote:
How do I activate a command if the player is in range of point and pressed the right key?
im trying this pawn Code:
|
PHP Code:
if
Try this one:
PHP Code:
#include <a_samp>
#define COLOR_BLUE 0x00FF00FF
#define COLOR_RED 0xFF0000FF
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == KEY_LOOK_BEHIND)
{
if(IsPlayerInRangeOfPoint(playerid,5.0, 2030.6146,1896.3336,12.1973))
{
SendClientMessage(playerid, COLOR_BLUE, "TEST COMPLETE");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED, "error");
}
return 1;
}
return 1;
}