AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin Optimize (https://forums.alliedmods.net/showthread.php?t=51311)

Phantom Warrior 02-15-2007 15:47

Plugin Optimize
 
As of said by: Hawk552

Quote:

Please post this in scripting help with a request for optimization, then ask an approver to move this back to new plugins / consider approval on it when you're done
Will somebody optimize this:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <tfcx>
#include <fun>

#define PLUGIN "TFC Weapons"
#define VERSION "1.0"
#define AUTHOR "Phantom Warrior"

public plugin_init() {
    
register_plugin("WeaponMe","0.1","Phantom Warrior)"
    
register_clcmd("say needrocket","fnSayNeedRocket")
    
register_clcmd("say needshotgun","fnSayNeedShotGun")
    
register_clcmd("say needknife","fnSayNeedKnife")
    
register_clcmd("say needsniper","fnSayNeedSniper")
    
register_clcmd("say needautorifle","fnSayNeedAutoRifle")
    
register_clcmd("say needflamer","fnSayNeedFlamer")
    
register_clcmd("say needrail","fnSayNeedRail")
    
register_clcmd("say needmedkit","fnSayNeedMedkit")
    
register_clcmd("say needac","fnSayNeedAc")
   
}

public 
fnSayNeedRocket(id) {
    
give_item(id"tf_weapon_rpg")
    
tfc_setbammo(idTFC_AMMO_ROCKETS,25)
    
client_cmd(id"tf_weapon_rpg")
    
}

public 
fnSayNeedKnife(id) {
    
give_item(id,"tf_weapon_knife")
    
client_cmd(id,"tf_weapon_knife")
    
}

public 
fnSayNeedShotGun(id) {
    
give_item(id"tf_weapon_shotgun")
    
client_cmd(id"tf_weapon_shotgun")
   
   }
   
  public 
fnSayNeedSniper(id) {
       
give_item(id"tf_weapon_sniperrifle")
    
client_cmd(id"tf_weapon_sniperrifle")
    
}

public 
fnSayNeedAutoRifle(id) {
    
give_item(id"tf_weapon_autorifle")
    
client_cmd(id"tf_weapon_autorifle")
    
}

public 
fnSayNeedFlamer(id) {
    
give_item(id"tf_weapon_flamethrower")
    
client_cmd(id"tf_weapon_flamethrower")
    
}

public 
fnSayNeedRail(id) {
    
give_item(id"tf_weapon_railgun")
    
client_cmd(id"tf_weapon_railgun")
    
}

public 
fnSayNeedMedKit(id) {
    
give_item(id"tf_weapon_railgun")
    
client_cmd(id"tf_weapon_railgun")
    
}

public 
fnSayNeedAc(id) {
    
give_item(id"tf_weapon_ac")
    
client_cmd(id"tf_weapon_ac")
    


(Rewrite it better?)

FormulaZero 02-15-2007 16:20

Re: Plugin Optimize
 
You do know this isn't all the weapons to TFC correct?

Zenith77 02-15-2007 17:08

Re: Plugin Optimize
 
I already said I would help you this weekend.


All times are GMT -4. The time now is 11:05.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.