SA-MP Forums Archive
Need Help With Fly/AirBreak Detection - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need Help With Fly/AirBreak Detection (/showthread.php?tid=591586)



Need Help With Fly/AirBreak Detection - DeathCore - 13.10.2015

I've a Fly Detector and its a very good detector but when a player is on a Driven vehicle by someone and speeds up at about lets say.. 250 Km/h and right away the Detector suspects the player of using Fly/Surf but it was a VEHICLE SPEED!

So I've tried to place a new CHECK if the player who *tries* to fly , located near a DRIVEN vehicle.. so the Detector have returned false. and ofc it didn't work..


I'll glad for some help from experts ^.^


Re: Need Help With Fly/AirBreak Detection - Logic_ - 14.10.2015

post your code and we will help you


Re: Need Help With Fly/AirBreak Detection - karemmahmed22 - 14.10.2015

Actually we don't need your code but, If you want to detect only Airbreakers [no car fly or whatever] you should put this check to check if the player isn't in a car then execute your code, else it just returns 1 or whatsoever
PHP код:
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
    {
        
// Your code here
    




Re: Need Help With Fly/AirBreak Detection - xTURBOx - 14.10.2015

Try https://sampforum.blast.hk/showthread.php?tid=474196


Re: Need Help With Fly/AirBreak Detection - Killa[DGZ] - 14.10.2015

You could use 'GetPlayerSurfingVehicleID' to check if the player is riding a vehicle?

You can read about it here.
https://sampwiki.blast.hk/wiki/GetPlayerSurfingVehicleID


Re: Need Help With Fly/AirBreak Detection - DeathCore - 14.10.2015

Quote:
Originally Posted by karemmahmed22
Посмотреть сообщение
Actually we don't need your code but, If you want to detect only Airbreakers [no car fly or whatever] you should put this check to check if the player isn't in a car then execute your code, else it just returns 1 or whatsoever
PHP код:
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
    {
        
// Your code here
    

Well I've an Airbreak against PLAYER_STATE_ONFOOT.

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
Yea, I'm using it, it's a very good include!

Quote:
Originally Posted by Killa[DGZ]
Посмотреть сообщение
You could use 'GetPlayerSurfingVehicleID' to check if the player is riding a vehicle?

You can read about it here.
https://sampwiki.blast.hk/wiki/GetPlayerSurfingVehicleID
Wow. I actually didn't know about this function.. lol

TY!