Useful Functions [0.3b RC2] -
ZaR - 14.08.2010
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
Re: Useful Functions [0.3b RC2] -
YmOn - 14.08.2010
Great!
I help you to make this
Re: Useful Functions [0.3b RC2] -
ZaR - 14.08.2010
YmOn, who are you?
Re: Useful Functions [0.3b RC2] - [L3th4l] - 14.08.2010
Nice, is the IsPlayerInWater accurate? Let me go do some tests
Re: Useful Functions [0.3b RC2] -
CuervO - 14.08.2010
It should be as it detects the anim library for swimming... Great work
Re: Useful Functions [0.3b RC2] -
MisterTickle - 14.08.2010
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?
Re: Useful Functions [0.3b RC2] -
rbN. - 14.08.2010
Mirrors:
Version 0.0001b:
#1 <-- Pastebin
#2 <-- Rapidshare
#3 <-- Megaupload
#4 <-- Depositfiles
#5 <-- Hotfile
#6 <-- zSHARE
#7 <-- Uploading
Re: Useful Functions [0.3b RC2] -
Haji - 14.08.2010
good job!
Re: Useful Functions [0.3b RC2] -
CrunkBankS - 14.08.2010
awesome!
Re: Useful Functions [0.3b RC2] -
Hiddos - 14.08.2010
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.
Re: Useful Functions [0.3b RC2] -
Calgon - 14.08.2010
Nice work, looking forward to using the new animation functions.
Re: Useful Functions [0.3b RC2] -
ViruZZzZ_ChiLLL - 14.08.2010
Look's nice =)
Especially the "IsPlayerInWater(playerid)" function
Re: Useful Functions [0.3b RC2] -
matthewdriftking - 14.08.2010
That's what i was waiting for.. IsPlayerInWater!

But Can someone tell me how to use it ? xD
Re: Useful Functions [0.3b RC2] -
Lorenc_ - 14.08.2010
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.
Re: Useful Functions [0.3b RC2] -
Hiddos - 14.08.2010
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");
Re: Useful Functions [0.3b RC2] -
GaGlets(R) - 14.08.2010
ahm.. tell us about that body damage.. how accurati is that?
Re: Useful Functions [0.3b RC2] -
Blantas - 14.08.2010
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?
Re: Useful Functions [0.3b RC2] -
ZaR - 14.08.2010
Hiddos, When a player gets damage from weapon, he has animation
Re: Useful Functions [0.3b RC2] -
HyperZ - 14.08.2010
Huh Nice Work Guys
Re: Useful Functions [0.3b RC2] -
DarkPower - 14.08.2010
Finaly: IsPlayerInWater(playerid)