19.07.2015, 21:14
You make a timer:
Greekz
PHP код:
new checkFalling[MAX_PLAYERS char];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetTimerEx("@checkFalling",999,0,"if",playerid,z); //The playerid you wanna check
@checkFalling(i,Float:oZ);@checkFalling(i,Float:oZ) {
if(!IsPlayerInAnyVehicle(i)) return checkFalling{i}=0;
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
if(z >= oZ) return checkFalling{i}=0;
if(++checkFalling{i} == 3)
{
//Here he is falling with an Vehicle for over 3sec
return checkFalling{i}=0;
}
return SetTimerEx("@checkFalling",999,0,"if",i,z);
}