SA-MP Forums Archive
GetXYInFrontOfPlayer don't work? - 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: GetXYInFrontOfPlayer don't work? (/showthread.php?tid=375841)



GetXYInFrontOfPlayer don't work? - iWhite - 08.09.2012

Код:
	  if(GetPlayerSpecialAction(zmogus) != SPECIAL_ACTION_CUFFED)
	  {
		 new Float:x, Float:y, Float:z;
	     TogglePlayerControllable(zmogus, false);
	     SetPlayerSpecialAction(zmogus, SPECIAL_ACTION_CUFFED);
		 SetPlayerFacingAngle(zmogus, playerid);
		 GetPlayerPos(playerid, x, y, z);
		 GetXYInFrontOfPlayer(playerid, x, y, 0.5);
		 SetPlayerPos(zmogus, x, y, z);
		 ApplyAnimation(playerid, "GANGS", "hndshkfa", 4.1, 0, 0, 0, 0, 0, 1);
	     Talk(playerid, "You're under arrest!");
	     return 0;
	  }
"zmogus" should appear in front of me, but it doesn't. Any solutions?


AW: GetXYInFrontOfPlayer don't work? - Nero_3D - 08.09.2012

if you meant that the player didnt appear than zmogus didnt hold the right id
if you meant that the player teleported not in front of you, thats mostsly because of the low distance (0.5)