07.10.2012, 19:27
I feel like a real nub now and i am, but.. this is what i got:
I know the OnPlayerKeyStateChange is noobly written, but that should work, and the command /exit should work, right?, but when i press the walk key or type /exit nothing happens, and i have confirmed 3 times that the ifisplayerinrangeofpoint x y z cordinates is correct.
I know the OnPlayerKeyStateChange is noobly written, but that should work, and the command /exit should work, right?, but when i press the walk key or type /exit nothing happens, and i have confirmed 3 times that the ifisplayerinrangeofpoint x y z cordinates is correct.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInRangeOfPoint(playerid, 1812.6621, -1582.7909, 5700.4287, 4))
if(PRESSED(KEY_WALK))
{
SetPlayerPos(playerid, 913.4395,-2400.3862,13.2885);
return 1;
}
return 1;
}
COMMAND:exit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 1812.5574,-1582.7380,5700.4287, 25))
{
SetPlayerPos(playerid, 913.4395,-2400.3862,13.2885);
}
return 1;
}