Detect Punch +REP! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Detect Punch +REP! (
/showthread.php?tid=325225)
Detect Punch +REP! -
Gooday - 12.03.2012
Hello,how i can detect this:
When someone punches someone with a baton the person who got punched sees this message "You have been stunned"
Baton:
http://www.policehow.com/img/police%20baton.jpg
Re: Detect Punch +REP! -
Ballu Miaa - 12.03.2012
Why dont you use something like this using OnPlayerTakeDamange callback! Try this [Untested]
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(GetPlayerWeapon(issuerid) == 3)
{
new string[50],Attacker[MAX_PLAYERS];
GetPlayerName(issuerid, Attacker, sizeof (Attacker));
format(string, sizeof(string), "You have been stunned by %s", Attacker);
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
}
return 1;
}
Re: Detect Punch +REP! -
Gooday - 12.03.2012
BROWSER FAIL
Re: Detect Punch +REP! -
Gooday - 12.03.2012
But:
"top\BaseScript\gamemodes\base.pwn(2277) : warning 235: public function lacks forward declaration"
Re: Detect Punch +REP! -
Ballu Miaa - 12.03.2012
Quote:
Originally Posted by Gooday
But:
"top\BaseScript\gamemodes\base.pwn(2277) : warning 235: public function lacks forward declaration"
|
It should not show that warning as it is already defined in a_samp.inc of SAMP 0.3d package?
Are you using 0.3d?
Check this link for more info!