Please could you tell me why this plugin doesn't work? I want to give a specific starmoney to the terrorist and another to the ct, i don't understand why this doesnt work!
Quote:
#include <amxmodx>
#include <cstrike>
#include <amxmisc>
new PLUGIN[]="Change Health"
new AUTHOR[]="Test Vince"
new VERSION[]="1.00"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_money", "cmd_money", ADMIN_SLAY, "<moneyt> <moneyct>")
}
public cmd_money(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
new Arg1[5]
new Arg2[5]
//Get the command arguments from the console
read_argv(1, Arg1, 4)
read_argv(2, Arg2, 4)
//Convert the money from a string to a number
new moneyyt = str_to_num(Arg1)
new moneyyct = str_to_num(Arg2)
new players[32], num
get_players(players, num)
new i
for (i=0; i<num; i++)
{
if (get_user_team(players[i]) == 1)
{
cs_set_user_money(players[i], moneyyt)
} else {
cs_set_user_money(players[i], moneyyct)
}
}
return PLUGIN_HANDLED
}
|
And I wish to make another plugin wish will write in the middle of the screen the distance of the closest ennemy, with the "client_prethink". I want to know if who the "id" designate too. Please excuse my english and ty for ur help!