Raised This Month: $ Target: $400
 0% 

Is it possible to optimize this code?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-04-2009 , 12:36   Re: Is it possible to optimize this code?
Reply With Quote #2

Quote:
Originally Posted by Lukass View Post
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).
__________________

Community / No support through PM
danielkza is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:12.


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