SA-MP Forums Archive
Disable weapon effect? - 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: Disable weapon effect? (/showthread.php?tid=332278)



Disable weapon effect? - Gooday - 07.04.2012

pawn Код:
//Other code here
if ( issuerid != INVALID_PLAYER_ID )
    {
        if ( GetPlayerWeapon( issuerid ) == 23 )
        {
            new string[50], Attacker[MAX_PLAYER_NAME], pzName[MAX_PLAYER_NAME];
            GetPlayerName( issuerid, Attacker, sizeof(Attacker) );
            GetPlayerName( playerid, pzName, MAX_PLAYER_NAME );
            format( string, sizeof(string), "(INFO) Officer %s has tazed you.", Attacker );
            SendClientMessage( playerid, COLOR_GOLD, string );
            format( string, sizeof(string), "(INFO) You have tazed %s.", pzName );
            SendClientMessage( issuerid, COLOR_GOLD, string );
            GameTextForPlayer(playerid,"~p~Tazed",3000,4);
            TogglePlayerControllable( playerid, 0 );
        }
   }
    return(1);
}
This is my tazer system. But the silenced pistol still "remove" health to the issued. I would like it can taze but it has no effect to the player/car health...Just TogglePlayerControllable...


Re: Disable weapon effect? - JonesyFoCoTDM - 07.04.2012

Try adding this to "OnPlayerTakeDamage"

Quote:

{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 23) SetPlayerHealth(playerid, HP-0);//SilencedColt
return 1;
}

Not 100% sure if it works, but it's worth a try