SA-MP Forums Archive
Fire in the hole! - 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: Fire in the hole! (/showthread.php?tid=347439)



Fire in the hole! - x96664 - 01.06.2012

Hi guys!
When I was playing counter strike,I have became an original idea. To make when somebody throw grenade to show him SendClientMessage(playerid,Color,"Fire in the hole!"); but I don't have any idea how can I do that, to detect when I'm throwing grenades. Please help me!


Re: Fire in the hole! - MP2 - 01.06.2012

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE && !(oldkeys & KEY_FIRE) && GetPlayerWeapon(playerid) == WEAPON_GRENADE)
    {
        // Send the message
    }
    return 1;
}



Re: Fire in the hole! - TheDominator - 01.06.2012

Wouldn't a TextDraw work better with something like this?