Need Help With Fly/AirBreak Detection
#1

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 ^.^
Reply
#2

post your code and we will help you
Reply
#3

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
    

Reply
#4

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

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
Reply
#6

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)