Hi, I have made a simple plugin which gives ammo packs to players who use the valid nicknames that I wrote when they connect server. As I said in the title, it compiled without any errors. I also tried it with the forward "client_putinserver()" but still same. What's wrong with this?
Code:
#include <amxmodx>
#include <zombieplague>
#define PLUGIN "Giving Ammo Packs When Valid Nicknames Perception"
#define VERSION "1.0"
#define AUTHOR "Jess"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /sil", "Event_Of_Remove_Ammo_Packs")
register_clcmd("say /sil", "Event_Of_Remove_Ammo_Packs")
}
public client_connect(ID) {
new Get_Player_Name[32]
get_user_name(ID, Get_Player_Name, charsmax(Get_Player_Name))
if(equali(Get_Player_Name, "Alex"))
{
client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
zp_set_user_ammo_packs(ID, zp_get_user_ammo_packs(ID) + 99999)
}
else if(equali(Get_Player_Name, "Kevin"))
{
client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
client_print_color(ID, ID, "^4Hey, welcome to the server. You have got ^399999 Ammo Packs. ^4Enjoy the game!")
zp_set_user_ammo_packs(ID, zp_get_user_ammo_packs(ID) + 99999)
}
}
public Event_Of_Remove_Ammo_Packs(ID) {
zp_set_user_ammo_packs(ID, zp_get_user_ammo_packs(ID) - 97000)
}