Chciałbym zrobić, aby w każdej rundzie była inna pogoda. Zrobiłem to, lecz nie pojawia się ani deszcz ani śnieg (gdy zostanie to wylosowane). Proszę o pomoc:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Pogoda"
#define VERSION "1.0"
#define AUTHOR "Nenczoks"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "logevent_round_start", "a", "1=0", "2=0")
}
public logevent_round_start()
{
pogoda()
}
public pogoda()
{
switch(random_num(1,100))
{
case 1..5:
{
return PLUGIN_HANDLED;
}
case 6..75:
{
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_rain"))
}
case 76..100:
{
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_snow"))
}
}
return PLUGIN_CONTINUE;
}
Pozdrawiam