Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- public OnFilterScriptInit()
- {
- print("\n--------------");
- print("w_guns loaded!");
- print("--------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- /* SetPlayerSkillLevel variables just to make it easier. */
- public OnPlayerSpawn(playerid)
- {
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
- return 1;
- }
- /*
- /* OnPlayerTakeDamage variables for those weapons that
- don't do as much harm as they should. */
- /* Melee */
- public OnPlayerTakeDamage(playerid,issuerid,Float:90,weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid == 0) // Fist
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 1) // Brass Knuck
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 5) // Bat
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 8) // Katana
- {
- SetPlayerHealth(playerid, 0.1);
- }
- return 1;
- }
- /* Explosive */
- public OnPlayerTakeDamage(playerid,issuerid,Float:20,weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid == 16) // Grenade
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 35) // RPG
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 36) // HS-RPG
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 39) // C4
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 51) // Explosion
- {
- SetPlayerHealth(playerid, 0.1);
- }
- return 1;
- }
- /* Low Powered Firearms */
- public OnPlayerTakeDamage(playerid,issuerid,Float:70,weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid == 22) // 9mm
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 23) // S-9mm
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 28) // Uzi
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 29) // MP5
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 32) // Tec-9
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 33) // C-Rifle
- {
- SetPlayerHealth(playerid, 0.1);
- }
- return 1;
- }
- /* Deagle + Shotguns */
- public OnPlayerTakeDamage(playerid,issuerid,Float:40,weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid == 24) // Deagle
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 25) // PumpShot
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 26) // Dual-SawedOff
- {
- SetPlayerHealth(playerid, 0.1);
- }
- return 1;
- }
- /* High Powered Firearms */
- public OnTakeDamage(playerid,issuerid,Float:30,weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid == 27) // Spas-12
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 30) // AK47
- {
- SetPlayerHealth(playerid, 0.1);
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 31) // M4A1
- {
- SetPlayerHealth(playerid, 0.1);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement