01. #include <amxmodx>
02. #include <amxmisc>
03. #include <fun>
04.
05. #define PLUGIN "New Plug-In"
06. #define VERSION "1.0"
07. #define AUTHOR "k1nader"
08. #define LOADING "^n^t%s v%s, Copyright (C) 2011 by %s^n"
09.
10. new iMaxplayers;
11.
12. public plugin_init()
13. {
14. register_plugin(PLUGIN, VERSION, AUTHOR);
15. server_print(LOADING,PLUGIN,VERSION,AUTHOR);
16. iMaxplayers = get_maxplayers();
17. set_task(40.0,"give_hegrenade",_,_,"b");
18. }
19.
20. public give_hegrenade()
21. {
22. for(new i = 1; i <= iMaxplayers; i++)
23. {
24. if(is_user_connected(i) && is_user_alive(i))
25. give_item(i,"weapon_hegrenade");
26. }
27. }
这是个例子俺不会弄。代码基础太差额……求把它写成可编译的完整代码……
[ 此帖被小闪客在2012-05-20 10:44重新编辑 ]