|
发表于 2012-4-5 11:21:50
|
显示全部楼层
来自 中国–浙江–杭州
本帖最后由 sakulekingz 于 2012-4-5 11:23 编辑
- #include <amxmodx>
- #include <amxmisc>
- #include <fun>
- #define PLUGIN "New Plug-In"
- #define VERSION "1.0"
- #define AUTHOR "k1nader"
- #define LOADING "^n^t%s v%s, Copyright (C) 2011 by %s^n"
- new iMaxplayers;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- server_print(LOADING,PLUGIN,VERSION,AUTHOR);
- iMaxplayers = get_maxplayers();
- set_task(40.0, "give_hegrenade",_,_,"b");
- }
- public give_hegrenade()
- {
- for(new i = 1; i <= iMaxplayers; i++)
- {
- if(is_user_connected(i) && is_user_alive(i))
- give_item(i, "weapon_hegrenade");
- }
- }
复制代码 写了一段例子。 |
|