Falling with vehicle detect
#1

never needed this ... sorry
Reply
#2

PHP код:
new Float:Pos_x,Float:Pos_y,Float:Pos_z;
new 
vehicleid GetPlayerVehicleID(playerid); 
    
GetVehicleVelocity(vehicleid,Pos_x,Pos_y,Pos_z);
    if(
Pos_x <= -0.800000  || Pos_y <= -0.800000 || Pos_z <= -0.800000)
    {
    }
    return 
1
Try this, not sure if it will work but a try never hurts :P
Reply
#3

You make a timer:

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(
>= 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);

Greekz
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)