Raised This Month: $ Target: $400
 0% 

Beginner need help !


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
windaub
Junior Member
Join Date: Mar 2006
Old 05-26-2006 , 13:59   Beginner need help !
Reply With Quote #1

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!
windaub is offline
 


Thread Tools
Display Modes

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 16:18.


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