SA-MP Forums Archive
Jump command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Jump command (/showthread.php?tid=65799)



Jump command - the_driver - 16.02.2009

Hi, i am trying to make a jump command but eacht time i compile it says something about the facing angle.. what is the problem ?
Код:
	// Jump
	if (strcmp("/jump", cmdtext, true, 10) == 0)
		{
				if(IsPlayerInAnyVehicle(playerid)) {
  				new Float:X;
					new Float:Y;
					new Float:Z;
				  new VehicleID;
				  GetPlayerPos(playerid, X, Y, Z);
				  VehicleID = GetPlayerVehicleID(playerid);
					SetVehiclePos(VehicleID, X, Y, Z + 800.00);
					SetPlayerFacingAngle(playerid,Ang);
					GivePlayerWeapon(playerid,46,1);
					}
				 	else
					{
					new Float:X;
					new Float:Y;
					new Float:Z;
					GetPlayerPos(playerid, X, Y, Z);
					SetPlayerPos(playerid, X, Y, Z + 800.00);
					SetPlayerFacingAngle(playerid,Ang);
					GivePlayerWeapon(playerid,46,1);
					GameTextForPlayer(playerid, "~w~Cya !",8000,5);
 				 	}
				return 1;
Error:
Код:
Untitled.pwn(153) : error 017: undefined symbol "Ang"
Untitled.pwn(163) : error 017: undefined symbol "Ang"
Thanks !



Re: Jump command - [LDT]LuxurY - 16.02.2009

add

pawn Код:
new Float:Ang;
GetPlayerFacingAngle(playerid,Ang);



Re: Jump command - the_driver - 16.02.2009

Yay it works ^^ thanks (:


Re: Jump command - MenaceX^ - 16.02.2009

You could do it with less lines.. :S,