Help with func
#1

I found this
PHP код:
public FallingChecker() 
{ 
   new 
Float:x,Float:y,Float:z,Float:d; 
   for(new 
i =0; i<MAX_PLAYERS; i++) 
   { 
     if(
IsPlayerConnected(i)) 
     { 
        
GetPlayerPos(i,x,y,z); 
        
d = floatsqroot((x-LastX[i] * x-LastX[i]) + (y-LastY[i] * y-LastY[i])); 
        if(
d < 10 && (LastZ[i] - z) > 5) 
        { 
          
OnPlayerFall(i); 
        } 
        
LastX[i] = x; 
        
LastY[i] = y; 
        
LastZ[i] = z; 
     } 
   } 
   return 
1; 
} 
public 
OnPlayerFall(playerid) 
{ 
    
SendClientMessage(playerid,0x000000FF,"You are falling!"); 
    return 
1; 
} 
And it is working as supposed to..
But any ideas how ca I make implement this in my anti speed hack. So if player is falling it won't detect him as cheater but he will get deteted as falling.. Any ideas?
Reply
#2

use boolean under onplayerfall set variable to true and when detecting check if the variable is true or false
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)