Jump to content

[BAT PLUGIN'S #3] Hats


Recommended Posts

Description: Cu acest plugin la connectarea la server, se va adauga o palarie random.

Version: 1.0

Download: Click


#include amxmodx.inc#include fakemeta.inc native remove_entity(ent); new const hat[][]={   "models/hat0.mdl",   "models/hat1.mdl",   "models/hat2.mdl",   "models/hat3.mdl",   "models/hat4.mdl",   "models/hat5.mdl",   "models/hat6.mdl",   "models/hat7.mdl",   "models/hat8.mdl",   "models/hat9.mdl"} new UserEnt[33] = -1 public plugin_precache() for(new i = 0; i < sizeof(hat); i++) precache_model(hat[i])public client_putinserver(id){new model[64]new infotarget = engfunc(EngFunc_AllocString, "info_target")new Entity = engfunc(EngFunc_CreateNamedEntity, infotarget) Entity = engfunc(EngFunc_CreateNamedEntity, infotarget)format(model, charsmax(model), "%s", hat[random_num(0,9)]) if(pev_valid(Entity)){engfunc(EngFunc_SetModel, Entity, model)set_pev(Entity, pev_movetype, MOVETYPE_FOLLOW)set_pev(Entity, pev_aiment, id)set_pev(Entity, pev_owner, id) UserEnt[id] = Entity}} public client_disconnect(id) if(UserEnt[id] != -1 && pev_valid(UserEnt[id])){remove_entity(UserEnt[id])UserEnt[id] = -1}

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...