PDA

View Full Version : [REQ] 16000 $ money plugin


frozen byte
03-27-2012, 20:40
Hi every one;
I want 16000 $ Plugin;and thanks a lot. Solved

kramesa
03-27-2012, 21:09
Can you explain what you want?

It is?

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

new pCvarEnable;

public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Spawn_Money", 1);

pCvarEnable = register_cvar("amx_money", "1");
}

public Spawn_Money(id)
{
if(get_pcvar_num(pCvarEnable))
{
if(is_user_alive(id))
{
cs_set_user_money(id, 16000);
}
}
}

frozen byte
03-28-2012, 09:35
I mean every round 16000 $

extream87
03-28-2012, 10:37
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

new pCvarEnable;
new g_iRestartCount = 1;

public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Spawn_Money", 1);
register_logevent("RoundStart", 2, "1=Round_Start");
pCvarEnable = register_cvar("amx_money", "1");
}

public RoundStart() {
if(g_iRestartCount == -1) {
}
else if(--g_iRestartCount == 0) {
g_iRestartCount = -1;
}
}

public Spawn_Money(id)
{
if(get_pcvar_num(pCvarEnable))
{
if(is_user_alive(id))
{
cs_set_user_money(id, 16000);
}
}
}


Tested and work ;)

Exolent[jNr]
03-28-2012, 10:41
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

new pCvarEnable;
new g_iRestartCount = 1;

public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Spawn_Money", 1);
register_logevent("RoundStart", 2, "1=Round_Start");
pCvarEnable = register_cvar("amx_money", "1");
}

public RoundStart() {
if(g_iRestartCount == -1) {
}
else if(--g_iRestartCount == 0) {
g_iRestartCount = -1;
}
}

public Spawn_Money(id)
{
if(get_pcvar_num(pCvarEnable))
{
if(is_user_alive(id))
{
cs_set_user_money(id, 16000);
}
}
}


Tested and work ;)

It works because it's the same thing as kramesa's code.
The added round count variable and round start hook both do nothing.

extream87
03-28-2012, 10:46
Yeah but the kramesa's code not work

Exolent[jNr]
03-28-2012, 10:50
Yeah but the kramesa's code not work

Yes it does.

frozen byte
03-28-2012, 11:54
thanks very much dude; But can you tell me the cvar commands ?

Exolent[jNr]
03-28-2012, 12:00
Use this one:

Can you explain what you want?

It is?

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

new pCvarEnable;

public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Spawn_Money", 1);

pCvarEnable = register_cvar("amx_money", "1");
}

public Spawn_Money(id)
{
if(get_pcvar_num(pCvarEnable))
{
if(is_user_alive(id))
{
cs_set_user_money(id, 16000);
}
}
}

Cvar is amx_money 0/1

frozen byte
03-28-2012, 12:48
Thanks dude.
Done.

frozen byte
03-28-2012, 20:17
error when compiling

fysiks
03-28-2012, 20:25
error when compiling

I think it may be an issue with how they are posting the code. Try this:

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

new pCvarEnable;

public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Spawn_Money", 1);
pCvarEnable = register_cvar("amx_money", "1");
}

public Spawn_Money(id)
{
if(get_pcvar_num(pCvarEnable))
{
if(is_user_alive(id))
{
cs_set_user_money(id, 16000);
}
}
}

frozen byte
03-28-2012, 20:38
Thank you. it's Done.