SetPlayerSPeed - 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: SetPlayerSPeed (
/showthread.php?tid=477942)
SetPlayerSPeed -
radiobizza - 27.11.2013
is there an function like SetPlayerSpeed(playerid, Float:kmh) ?
Re: SetPlayerSPeed -
Jankingston - 27.11.2013
hm...i dont think so
Re: SetPlayerSPeed -
Ballu Miaa - 27.11.2013
This is no function as SetPlayerSpeed but there is one as
SetPlayerVelocity. This function makes the player move in the given direction at the given speed.
Examples by
SA-MP Wiki:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/jump", cmdtext))
{
SetPlayerVelocity(playerid,0.0,0.0,0.2); //Forces the player to jump
return 1;
}
if (!strcmp("/sink", cmdtext))
{
SetPlayerVelocity(playerid,0.0,0.0,-0.5); //Forces the player to sink
return 1;
}
return 0;
}