PDA

View Full Version : Need Help With Fly/AirBreak Detection


DeathCore
13/10/2015, 11:34 PM
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 ^.^

Logic_
14/10/2015, 05:05 AM
post your code and we will help you

karemmahmed22
14/10/2015, 05:58 AM
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

if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
{
// Your code here
}

xTURBOx
14/10/2015, 06:15 AM
Try http://forum.sa-mp.com/showthread.php?t=474196

Killa[DGZ]
14/10/2015, 06:18 AM
You could use 'GetPlayerSurfingVehicleID' to check if the player is riding a vehicle?

You can read about it here.
http://wiki.sa-mp.com/wiki/GetPlayerSurfingVehicleID

DeathCore
14/10/2015, 11:20 AM
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

if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
{
// Your code here
}


Well I've an Airbreak against PLAYER_STATE_ONFOOT.

Try http://forum.sa-mp.com/showthread.php?t=474196

Yea, I'm using it, it's a very good include!

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

You can read about it here.
http://wiki.sa-mp.com/wiki/GetPlayerSurfingVehicleID

Wow. I actually didn't know about this function.. lol

TY! :D