How to detect if a vehicle is in water?
#1

Title explains it all.
Reply
#2

******:

https://sampforum.blast.hk/showthread.php?tid=242279
https://sampforum.blast.hk/showthread.php?tid=401833
https://sampforum.blast.hk/showthread.php?tid=314404
https://sampforum.blast.hk/showthread.php?tid=255950
https://sampforum.blast.hk/showthread.php?tid=171644
https://sampforum.blast.hk/showthread.php?tid=445636
Reply
#3

pawn Код:
stock IsVehicleInWater(vehicleid)
{
        new Float:water_areas[][] =
        {
                {25.0,  2313.0, -1417.0,        23.0},
                {15.0,  1280.0, -773.0,         1082.0},
                {15.0,  1279.0, -804.0,         86.0},
                {20.0,  1094.0, -674.0,         111.0},
                {26.0,  194.0,  -1232.0,        76.0},
                {25.0,  2583.0, 2385.0,         15.0},
                {25.0,  225.0,  -1187.0,        73.0},
                {50.0,  1973.0, -1198.0,        17.0}
        };
        for(new t=0; t < sizeof water_areas; t++)
        if(GetVehicleDistanceFromPoint(vehicleid,water_areas[t][1],water_areas[t][2],water_areas[t][3]) <= water_areas[t][0]) return 1;
    return 0;
}
By Ballu Miaa

check if that works
Reply
#4

https://sampwiki.blast.hk/wiki/OnVehicleDeath
Reply
#5

I want to make it for a derby system so it should constantly check if a vehicle falls in the water.

EDIT:
Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
I'll try this out, thanks.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)