Przejdź do głównej zawartości

IsPlayerObjectMoving

Description

Checks if the given player objectid is moving.

NameDescription
playeridThe ID of the player whose player-object is checked.
objectidThe player objectid you want to check if is moving.

Returns

1 if the player object is moving, 0 if not.

Examples

new gPlayerObject[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
gPlayerObject[playerid] = CreatePlayerObject(playerid, 2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0);

MovePlayerObject(playerid, gPlayerObject[playerid], 2001.195679, 1547.113892, 10.000000, 2.0);

if (IsPlayerObjectMoving(playerid, gPlayerObject[playerid]))
{
StopPlayerObject(playerid, gPlayerObject[playerid]);
}
return 1;
}