SA-MP Forums Archive
Throw Player away - 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: Throw Player away (/showthread.php?tid=450518)



Throw Player away - Blackazur - 13.07.2013

Hello, how can i make a command like /spartakick that when i type it the player fly some meters away?


Re: Throw Player away - Threshold - 13.07.2013

https://sampwiki.blast.hk/wiki/SetPlayerVelocity

I believe this may be what you're looking for.


Re: Throw Player away - JimmyCh - 13.07.2013

Something like..
pawn Код:
CMD:spartakick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >=1)
{
new PosX, PosY, PosZ;
GetPlayerVelocity(player2, PosX, PosY, PosZ);
SetPlayerVelocity(player2, PosX+1, PosY+1, PosZ+1);
}
else
{
SendClientMessage(playerid, -1, "You don't have the authority to use this command!");
return 1;
}
return 1;
}
Something like that?