[FilterScript] Useful Functions [0.3b RC2]
#21

[up][up][up][up]
Reply
#22

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Yeh it could although there is another way you can do it, i made it:

pawn Код:
stock IsPlayerInWater(playerid)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(z <= -2) return true;
    return false;
}
Untested but it should work fine.
I just wonder how is that accurate, if it only has to do with z? It would've been helpful if someone actually goes through all the water area and record them to coordinates. SA:MP Devs should do something with IsPlayerInWater.
Reply
#23

IsPlayerInWater(playerid)

GetPlayerPos x y z
if player pos 0 or -[SOME AMMOUNT] player is in water
Reply
#24

Wrong, there are positions that goes below the Z Pos 0 (Sea Level), such the hunter quarry bottom, the sewers at Los Santos, etcetera, so the code above is not accurate at all.
Reply
#25

My code based on animations and it's very accurate
Reply
#26

Yes.. accurate.. With OnPlayerUpdate and with 400++ player it wont be accurate for server...
Reply
#27

I don't think it was intended to be used in OnPlayerUpdate. A command that checks all the players to see what they are currently doing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)