Detect Punch +REP!
#1

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
Reply
#2

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;
}
Reply
#3

BROWSER FAIL
Reply
#4

But:

"top\BaseScript\gamemodes\base.pwn(2277) : warning 235: public function lacks forward declaration"
Reply
#5

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)