Re: Vision
What I did wrong??... I actually forgot coding but :D ....
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define PLUGIN "AVP" #define VERSION "1.0" #define AUTHOR "GetH!X" #define CLASS_HUMAN 0 #define CLASS_ALIEN 1 #define CLASS_PREDATOR 2 #define MAXCLASSES 3 new PlayerClass[33] new const CLASSES[MAXCLASSES][] = { "Human", "Alien", "Predator" }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_menucmd(register_menuid("menu_ChooseRace"),1023,"DoChooseRace") register_clcmd("say /race", "ChooseRace") register_clcmd("say_team /race", "ChooseRace") } public client_connect(id) { ChooseRace(id) } stock ChooseRace(id) { new menu[192] new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2 format(menu, 191, "[AVP] Choose your char^n^n1. Stay human^n2. Alien^n3. Predator") show_menu(id, keys, menu, -1, "menu_ChooseRace") return PLUGIN_CONTINUE } public DoChooseRace(id, key) { if(key == 0) { PlayerClass[id] = CLASS_HUMAN client_print(id, print_chat, "[AVP] HUMAN!") human_main(id) } if(key == 1) { PlayerClass[id] = CLASS_ALIEN client_print(id, print_chat, "[AVP] ALIEN!") alien_main(id) } if(key == 2) { PlayerClass[id] = CLASS_PREDATOR client_print(id, print_chat, "[AVP] PREDATOR!") predator_main(id) } return PLUGIN_HANDLED } public human_main(id) { client_print(id, print_center, "You are human") //here will be some basic skills } public alien_main(id) { client_print(id, print_center, "You are alien") //here will be some basic skills } public predator_main(id) { client_print(id, print_center, "You are predator") //here will be some basic skills }
|