Is there a way to stop a player from running?
#1

Subject is my question, Thanks!
Reply
#2

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

not freezing him -.- he wouldn't walk ....
Reply
#4

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.
Reply
#5

use animation
Reply
#6

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?
Reply
#7

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
Reply
#8

this includes just play an animation... this isnt wat i want..
Reply
#9

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...
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)