here you go
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Rain"
#define VERSION "1.0"
#define AUTHOR "uxmal"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache() {
new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"env_rain"));
if(ent > 0) {
new spent = engfunc(EngFunc_FindEntityByString,1,"classname","info_player_start");
if(!spent)
return PLUGIN_HANDLED;
new origin[3];
pev(spent,pev_origin,origin,3);
engfunc(EngFunc_SetOrigin,ent,origin);
//dllfunc(DLLFunc_Spawn, ent);
// not needed
}
else {
client_print(0,print_center,"ERROR");
}
return PLUGIN_HANDLED;
}
I think you needn't even set the origin of the ent cause it rains on the whole map but in my code it spawns the ent at the first ct spawnpoint