SA-MP Forums Archive
Is there a way to stop a player from running? - 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: Is there a way to stop a player from running? (/showthread.php?tid=263004)



Is there a way to stop a player from running? - [Ask]Terminator - 20.06.2011

Subject is my question, Thanks!


Re: Is there a way to stop a player from running? - Wesley221 - 20.06.2011

pawn Код:
TogglePlayerControllable(playerid, true/false);
Thats the only thing i think.


Re: Is there a way to stop a player from running? - [Ask]Terminator - 20.06.2011

not freezing him -.- he wouldn't walk ....


Re: Is there a way to stop a player from running? - Mauzen - 20.06.2011

Check if the player is playing the running animation, and if yes apply the walk animation to him. Someone made an include for that some time ago, and this is the way it works.


Re: Is there a way to stop a player from running? - sampfans - 20.06.2011

use animation


Re: Is there a way to stop a player from running? - [Ask]Terminator - 20.06.2011

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Check if the player is playing the running animation, and if yes apply the walk animation to him. Someone made an include for that some time ago, and this is the way it works.
Can you give me the link?


Re: Is there a way to stop a player from running? - Mauzen - 20.06.2011

Here it is https://sampforum.blast.hk/showthread.php?tid=206024
But it cant be that hard to find it, i also just used the search


Re: Is there a way to stop a player from running? - [Ask]Terminator - 20.06.2011

this includes just play an animation... this isnt wat i want..


Re: Is there a way to stop a player from running? - Madsen - 20.06.2011

well thats the closest you get to fix your problem it checks if the player is running and if he is he starts to walk if the fs works correctly...


Re: Is there a way to stop a player from running? - Donya - 20.06.2011

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerAnimationIndex(playerid) == 458 || GetPlayerAnimationIndex(playerid) == 901 ||
    GetPlayerAnimationIndex(playerid) == 908 || GetPlayerAnimationIndex(playerid) == 1222 ||
    GetPlayerAnimationIndex(playerid) == 1223 || GetPlayerAnimationIndex(playerid) == 1224 ||
    GetPlayerAnimationIndex(playerid) == 1225 || GetPlayerAnimationIndex(playerid) == 1226
    || GetPlayerAnimationIndex(playerid) == 1227
    || GetPlayerAnimationIndex(playerid) == 1228
    || GetPlayerAnimationIndex(playerid) == 1229
    || GetPlayerAnimationIndex(playerid) == 1230
    || GetPlayerAnimationIndex(playerid) == 1231
    || GetPlayerAnimationIndex(playerid) == 1232
    || GetPlayerAnimationIndex(playerid) == 1233
    || GetPlayerAnimationIndex(playerid) == 1236
    || GetPlayerAnimationIndex(playerid) == 1249
    || GetPlayerAnimationIndex(playerid) == 1276
    || GetPlayerAnimationIndex(playerid) == 1277
    || GetPlayerAnimationIndex(playerid) == 1278
    || GetPlayerAnimationIndex(playerid) == 1279
    || GetPlayerAnimationIndex(playerid) == 1280
    || GetPlayerAnimationIndex(playerid) == 1384) // player is running
    return 1;
}
note: i know i missed some animations, but those are the basic ones. including women animation, muscular animation, ped animation, swat run. etc those that i didn't include were like basketball run