STUCK - 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: STUCK (
/showthread.php?tid=485485)
STUCK -
MatriXgaMer - 04.01.2014
Hello.
I need help, how to make an stuck command. I searched but didnt found anything
Re: STUCK -
Wizza - 04.01.2014
Stuck command?
pawn Код:
CMD:stuck(playerid, params[])
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+1);
TogglePlayerControllable(playerid, 1);
ClearAnimations(playerid);
return 1;
}
I didn't understand you very well so i just did this for you it unfreezes him clear his animations and then puts him 1 metre from the ground then releases him.
Re: STUCK -
MatriXgaMer - 04.01.2014
No, i need to make a command like if an player is stuck in a vehicle and he cant exit that it add his cordinate +10.
SORRY FOR BAD ENGLISH
Re: STUCK -
Wizza - 04.01.2014
Here then
pawn Код:
CMD:stuck(playerid, params[])
{
new Float:Pos[3];
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+10);
}
else
{
SendClientMessage(playerid, -1, "You are not in a vehicle!");
}
return 1;
}
Re: STUCK -
MatriXgaMer - 04.01.2014
Never mind fixed it by my self but thanks for the help!