Scripting Question
#1

Whats callback called when players walks/moving ?
Reply
#2

There isn't a callback that does that but you can use GetPlayerKeys to detect if a players presses W, A, S or D.

https://sampwiki.blast.hk/wiki/GetPlayerKeys
Reply
#3

pawn Код:
public OnPlayerUpdate(playerid)
{
    new Keys, ud, lr;
    GetPlayerKeys(playerid, Keys, ud, lr);
    if(ud == KEY_UP) //Player is pressing 'UP or W' (By default)
    else if(ud == KEY_DOWN) //Player is pressing 'DOWN or S' (By default)
 
    if(lr == KEY_LEFT) //Player is pressing 'LEFT or A' (By default)
    else if(lr == KEY_RIGHT) //Player is pressing 'RIGHT or D' (By default)
    return 1;
}
Source:
https://sampwiki.blast.hk/wiki/GetPlayerKeys
https://sampwiki.blast.hk/wiki/OnPlayerUpdate
https://sampwiki.blast.hk/wiki/Keys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)