Code:
#include <amxmodx>
new const g_maps[][] =
{
"de_inferno",
"de_dust2"
}
public plugin_init(){
register_plugin("Drop Awp","0.3","Faval")
register_event("WeapPickup","Kontroll","b","1=18")
return PLUGIN_CONTINUE
}
public Kontroll(id) {
new map[32]
get_mapname(map, 31)
for(new i=0;i< sizeof(g_maps);i++)
{
if(equal(map, g_maps[i]))
{
return PLUGIN_CONTINUE
}
new llama = read_data(0)
client_print(llama,print_center,"AWP pole lubatud.")
engclient_cmd(llama, "drop","weapon_awp")
client_cmd(llama,"drop weapon_awp")
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}
My problem is that it reads the first map fine, but mapnames after that aren't read by the plugin.