-=如何加代码=-
#include <amxmodx>#include <amxmisc>
#include <cstrike>
public plugin_init()
{
register_plugin("GiveMoney","3.0","ds")
register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
public new_round()
{
new nums,players
get_players(players,nums)
for(new i=0;i<nums;i++)
{
if (get_user_flags(players) & ADMIN_IMMUNITY)
{
cs_set_user_money(players, 10000)
if (get_user_flags(players) & ADMIN_RESERVATION)
{
cs_set_user_money(players, 7000)
if (get_user_flags(players) & ADMIN_LEVEL_B)
{
cs_set_user_money(players, 4500)
}
}
}
我这样笨笨的加上无法翻译
想加入不同权限不同奖励金额
原代码:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init()
{
register_plugin("Money","3.0","da")
register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
public new_round()
{
new nums,players
get_players(players,nums)
for(new i=0;i<nums;i++)
{
if (get_user_flags(players) & ADMIN_LEVEL_B)
{
cs_set_user_money(players, 10000)
}
}
} eles
{
} 本帖最后由 心静如水 于 2009-3-15 23:47 编辑
players改成
..
players
打不出字母..晕了 #include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init()
{
register_plugin("GiveMoney","3.0","ds")
register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
public new_round()
{
new nums,players
get_players(players,nums)
for(new i=0;i<nums;i++)
{
if (get_user_flags(players) & ADMIN_IMMUNITY)
{
cs_set_user_money(players, 10000)
}
else{
if (get_user_flags(players) & ADMIN_RESERVATION)
{
cs_set_user_money(players, 7000)
}
else{
if (get_user_flags(players) & ADMIN_LEVEL_B)
{
cs_set_user_money(players, 4500)
}
}
}
}
} 谢谢!可以编译了
页:
[1]