View Single Post
xGreat
Senior Member
Join Date: Jul 2012
Location: Chilean
Old 08-01-2013 , 10:02   Re: [COD]Busco plugin de monedas
#8

EDIT : Mira aqui te dejo un code que hice recien , ahora tu a este le pones el menu de armas o de lo que quieras.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "Monedas"
#define VERSION "1.0"
#define AUTHOR "xGreat"

#define Prefix "[ASD]"

new Moneda[33]
new 
g_MsgSync

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_MsgSync CreateHudSyncObj()
    
    
RegisterHam(Ham_Killed"player""ham_killed"1)
}

public 
client_putinserver(id)
{
    
Moneda[id] = 0
    
    set_task
(2.0"Hud_Moneda"id+100__"b")
}

public 
Hud_Moneda(id)
{
    
set_hudmessage(2551270, -1.00.9106.01.0)
    
ShowSyncHudMsg(idg_MsgSync"Tienes [%d] Monedas"Moneda[id])
}

public 
ham_killed(victimattacker)
{
    if(
cs_get_user_team(attacker) == CS_TEAM_CT)
    {
        
Moneda[attacker] += // Si es CT Gana 1 moneda
        
client_print(attackerprint_chat"%s Ganas 1 moneda"Prefix)
    }
    if(
cs_get_user_team(attacker) == CS_TEAM_T)
    {
        
Moneda[attacker] += // Si es Terrorista gana 3 monedas
        
client_print(attackerprint_chat"%s Ganas 3 monedas"Prefix)
    }
    
    
Moneda[victim] -= // Si lo matan o se mata pierde 1
    
client_print(victimprint_chat"%s Pierdes 1 moneda por morir"Prefix)

Pruebalo y avisa.

Saludos xGreat
__________________
Mi 255
WwW.HnsBJz.Tk = MI FORO


Last edited by xGreat; 08-01-2013 at 10:35.
xGreat is offline
Send a message via MSN to xGreat