04.01.2014, 14:08
Hello.
I need help, how to make an stuck command. I searched but didnt found anything
I need help, how to make an stuck command. I searched but didnt found anything
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;
}
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;
}