 |
|
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
|

01-04-2009
, 12:36
Re: Is it possible to optimize this code?
|
#2
|
Quote:
Originally Posted by Lukass
Code:
register_clcmd("say /noriuvip","noriu_vip",0,"- Jeigu nori VIP")
register_clcmd("say /viprules","vip_rules",0,"- VIP taisykles")
register_clcmd("say /rules","rules",0,"- Taisykles")
public noriu_vip(id) {
show_motd(id,"noriuvip.txt","Nori VIP?")
}
public vip_rules(id) {
show_motd(id,"viprules.txt","VIP taisykles")
}
public rules(id) {
show_motd(id,"rules.txt","Taisykles")
}
It`s possible to use one function instead these three?
|
Yes, but it would make the code bigger, not smaller, and would bring you no benefit unless there is some common logic among the 3 commands (actually there's no logic at all).
__________________
|
|
|
|