Raised This Month: $ Target: $400
 0% 

ResetScore Optimizing/Remove Fakemeta


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-29-2012 , 11:24   Re: ResetScore Optimizing/Remove Fakemeta
Reply With Quote #1

Damn forget the idea to remove fakemeta, it's fine and what you gonna do is to make inefficient plugins and run them on your server.

Want to optimize ? Remove the useless task and use that code :

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Reset Score"
#define VERSION "0.0.2"

#define m_iDeaths 444

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" )
    
register_clcmd("say /rs""ClCmd_ResetScore")
    
register_clcmd("say_team /rs""ClCmd_ResetScore")
}

public 
ClCmd_ResetScore(id
{
    new 
frags get_user_frags(id)
    if( 
frags || get_pdata_int(idm_iDeaths) )
    {
        
set_pdata_int(idm_iDeaths0)
        
ExecuteHam(Ham_AddPointsid, -frags1)

        new 
szName[32]
        
get_user_name(idszNamecharsmax(szName))

        
client_print(0print_chat"%s has just reset his score"szName)
        return 
PLUGIN_CONTINUE
    
}
    
client_print(idprint_chat"Your score is already null")
    return 
PLUGIN_HANDLED_MAIN

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-29-2012 at 13:45. Reason: added #6 request
ConnorMcLeod is offline
Reply



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 22:10.


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