Inside of car gate and /heal system
#1

Ok I feel really stupid for asking this but could someone tell me what's wrong with this script?
Everything works fine while I'm on foot but as soon as I get in car the script stops working. Is the range too small or what? (Sorry for wasting your time but I'm really tired and I want to finish this today)
pawn Код:
if ((oldkeys & KEY_CTRL_BACK) && !(newkeys & KEY_CTRL_BACK))
        {
        if(IsPlayerInRangeOfPoint(playerid, 5.0,-76.5506,-353.0117,1.4297))
            {
            if(gTeam[playerid] == 6)
            {
                MoveObject(hgate,-74.55550,-352.80170,-2.35262,5,0.00000,0.00000,90.00000);
                SetTimer("hgateClose",5000,false);
                }
                return 1;
            }
        }
Also can someone give me an example of how to make a heal command? Something like /heal [id] gives health to the player (Sorry again for wasting your time)
Reply
#2

IsPlayerInRangeOfPoint only works if the player is outside a vehicle.
Reply
#3

Should I use something like if(GetVehicleDistanceFromPoint(vehicleid) <= 5) ? (I know that code is wrong just giving an example)
Reply
#4

****** for IsVehicleInRangeOfPoint (Pre-made stock) Place it anywhere in your GM.
Reply
#5

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
IsPlayerInRangeOfPoint only works if the player is outside a vehicle.
Source? Too lazy to check right now.
Reply
#6

Quote:
Originally Posted by ReneG
Посмотреть сообщение
Source? Too lazy to check right now.
Experiance, I'm sure it will say on SAMP Wiki. The clue is in IsPLAYERInRangeOfPoint. It's also down to you to verify my answer.
Reply
#7

Weeeeew ... BUMP ... I didn't fixed it yet. Please help (I tryed to get the car's distance from point and if the distance was < 5 then the gate should open ... doesn't works )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)