View Single Post
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 08-05-2010 , 06:25   Re: [REQ] only admins can have money
Reply With Quote #2

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

#define IsUserAdmin(%1)  (get_user_flags(%1) & ADMIN_KICK)

#define PLUGIN "Admin money Only"
#define VERSION "1.0"
#define AUTHOR "SpeeD"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_PlayerPreThink"Forward_PlayerPreThink")
}

public 
Forward_PlayerPreThink(id)
{
    new 
szMoney cs_get_user_money(id)
    if(
szMoney && !IsUserAdmin(id))
        
cs_set_user_money(id,0)

You can try this.It ressets the non admin player (that doesnt have admin_kick flag,you can change the flag to whatever you want) money to 0.
SpeeDeeR is offline