Disable weapon effect?
#1

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)