is player on foot
#1

hi i want to check every 10 seconds if a player is on foot and then do like strip weapons etc
how can i do this

on playerstate change does not work for this.
thanks
Reply
#2

try this?
Код:
SetTimer("onfoot", 600, 0);
Код:
forward onfoot(playerid);
public onfoot(playerid)
{
 if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
 {
 ResetPlayerWeapons(playerid);
 return 1;
 }
}
Reply
#3

@kims: 600 is not 10 minutes, 600000 is. You need to set interval in miliseconds.
Reply
#4

Quote:
Originally Posted by Don Correlli
@kims: 600 is not 10 minutes, 600000 is. You need to set interval in miliseconds.
He needs
Quote:

10 seconds

Reply
#5

Ah sorry, didn't saw he was talking about seconds. But still, 600 is not 10 seconds, 10000 is.
Reply
#6

And not
Код:
SetTimer("onfoot", 600, 0);
but
Код:
SetTimerEx("onfoot", 10000, 1, "d", playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)