SetPlayerPos dosent happen? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetPlayerPos dosent happen? (
/showthread.php?tid=383529)
SetPlayerPos dosent happen? -
gnoomen2 - 07.10.2012
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.
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;
}
Re: SetPlayerPos dosent happen? -
PrawkC - 07.10.2012
You've messed up the arguments for IsPlayerInRangeOfPoint, its playerid, range, x, y, z
Re: SetPlayerPos dosent happen? -
gnoomen2 - 07.10.2012
oh god, lol

haha, thanks