/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "Zevkine"
#define VERSION "1.0"
#define AUTHOR "Kalipso22"
#define REKLAM "Webdiyo"
#define KISATAG "WD"
new doguncamodel[64] = "doguncamodel"
new ceday[64] = "ceday"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /modelmenu","beBM5");
RegisterHam(Ham_Spawn, "player", "bePS", 1);
RegisterHam(Ham_Killed, "player", "beAO")
}
public plugin_precache(){
precache_model("models/player/doguncamodel/doguncamodel.mdl");
precache_model("models/player/ceday/ceday.mdl");
}
public beBM5(id) {
new menuz;
static amenu[512];
formatex(amenu,charsmax(amenu),"\d[ \r%s \d] \wModel Menu",REKLAM);
menuz = menu_create(amenu,"beBM5_devam");
formatex(amenu,charsmax(amenu),"\d[ \r%s \d] \y- \wCeday Modeli",KISATAG);
menu_additem(menuz,amenu,"1");
menu_setprop(menuz,MPROP_EXITNAME,"\rCikis");
menu_setprop(menuz,MPROP_EXIT,MEXIT_ALL);
menu_display(id,menuz,0);
}
public beBM5_devam(id,menu,item){
if(item == MENU_EXIT){
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new access,callback,data[6],iname[64];
menu_item_getinfo(menu,item,access,data,5,iname,63,callback);
new key = str_to_num(data);
switch(key){
case 1 : {
if(is_user_alive(id)){
cs_set_user_model(id,ceday);
}
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public bePS(){
new players[32], inum;
static id;
get_players(players, inum, "a")
for(new i; i < inum; i++) {
id = players[i];
if(is_user_alive(id)){
cs_set_user_model(id,doguncamodel);
}
}
}
public beAO(victim, attacker, shouldgib)
{
cs_reset_user_model(victim);
}