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

functions:
pawn Код:
bool:IsPlayerInWater(playerid)
bool:IsPlayerDucked(playerid)
bool:IsPlayerAim(playerid)
bool:IsPlayerStand(playerid)
bool:IsPlayerDuckedMove(playerid)
callbacks:
pawn Код:
//Bodyparts
#define armL 0
#define armR 1
#define legL 2
#define legR 3
#define stomach 4
#define gravity 5
//callback
OnPlayerDamaged(playerid, bodypart)
Version 0.0001b, download now
Reply
#2

Great!
I help you to make this
Reply
#3

YmOn, who are you?
Reply
#4

Nice, is the IsPlayerInWater accurate? Let me go do some tests
Reply
#5

It should be as it detects the anim library for swimming... Great work
Reply
#6

Quote:
Originally Posted by ZaR
Посмотреть сообщение
functions:
pawn Код:
bool:IsPlayerInWater(playerid)
bool:IsPlayerDucked(playerid)
bool:IsPlayerAim(playerid)
bool:IsPlayerStand(playerid)
bool:IsPlayerDuckedMove(playerid)
callbacks:
pawn Код:
//Bodyparts
#define armL 0
#define armR 1
#define legL 2
#define legR 3
#define stomach 4
#define gravity 5
//callback
OnPlayerDamaged(playerid, bodypart)
Version 0.0001b, download now
How accurate are the Body Parts detection? I am confused in how that could even work and also, This will not work for 0.3a?
Reply
#7

Mirrors:


Version 0.0001b:
#1 <-- Pastebin
#2 <-- Rapidshare
#3 <-- Megaupload
#4 <-- Depositfiles
#5 <-- Hotfile
#6 <-- zSHARE
#7 <-- Uploading


Reply
#8

good job!
Reply
#9

awesome!
Reply
#10

Quote:
Originally Posted by MisterTickle
Посмотреть сообщение
How accurate are the Body Parts detection? I am confused in how that could even work and also, This will not work for 0.3a?
Wondering the same. This won't work for 0.3a thought, works with GetPlayerAnimationIndex.
Reply
#11

Nice work, looking forward to using the new animation functions.
Reply
#12

Look's nice =)
Especially the "IsPlayerInWater(playerid)" function
Reply
#13

That's what i was waiting for.. IsPlayerInWater! But Can someone tell me how to use it ? xD
Reply
#14

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
Nice, is the IsPlayerInWater accurate? Let me go do some tests
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.
Reply
#15

Quote:
Originally Posted by matthewdriftking
Посмотреть сообщение
That's what i was waiting for.. IsPlayerInWater! But Can someone tell me how to use it ? xD
pawn Код:
if(IsPlayerInWater(playerid)) print("The player is in the water");
else print("The player isn't in the water");
Reply
#16

ahm.. tell us about that body damage.. how accurati is that?
Reply
#17

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
pawn Код:
stock IsPlayerInWater(playerid)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(z <= -2) return true;
    return false;
}
And what if player is at the bottom of hunter quarry?
Reply
#18

Hiddos, When a player gets damage from weapon, he has animation
Reply
#19

Huh Nice Work Guys
Reply
#20

Finaly: IsPlayerInWater(playerid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)