IsPlayerMoving - Would this work?
#1

pawn Код:
stock bool:IsPlayerMoving(playerid)
{
    new Float:Velocity[3];
    GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
    if(Velocity[0] == 0 && Velocity[1] == 0 && Velocity[2] == 0) return false;
    return true;
}
Reply
#2

Maybe. Why haven't you tried it?
I also recommend you to classfield Velocity with playerid array, not to mix'em.

new Float:Velocity[MAX_PLAYERS][3];
...
Reply
#3

Quote:
Originally Posted by Stront
Посмотреть сообщение
Maybe. Why haven't you tried it?
I also recommend you to classfield Velocity with playerid array, not to mix'em.

new Float:Velocity[MAX_PLAYERS][3];
...
Yeah I've tried it and it works nicely. Thanks for the suggestion also.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)