Offline |
![Nagyúr Nagyúr](./images/ranks/hl17.png) |
Csatlakozott: 2016.03.03. 17:37 Hozzászólások: 530
Megköszönt másnak: 4 alkalommal Megköszönték neki: 65 alkalommal
|
Próbáld: Tulaj jog: (a) FőAdmin: rcon jog Admin: ban jog VIP: kick jog #include <amxmodx> #include <amxmisc> #include <nvault> #define PLUGIN "HLMOD.Hus Rangok" #define VERSION "1.0" #define AUTHOR "ExTraaaa and qKKKJ;>" new message[192] new nev[32] new Temp[192] static color[10] new g_vault new olesek[33] new szint[33] #define ASD 17 #define TULAJ ADMIN_IMMUNITY // a jog #define FOADMIN ADMIN_RCON // Rcon jog #define ADMIN ADMIN_BAN // Ban jog #define VIP ADMIN_KICK // kic jog //Ha az ASD Ă©rtĂ©ke 15 akkor a szamoknal 15 szám a rangoknál 16 szöveg new const szamok[ASD] = { 0, 25, 50, 75, 100, 150, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900 } new const rangok[ASD+1][] = { "Silver I", "Silver II", "Silver III", "Silver IV", "Silver Elite", "Silver Elite Master", "Gold Nova I", "Gold Nova II", "Gold Nova III", "Gold Nova Master", "Master Guardian I", "Master Guardian II", "Master Guardian Elite", "Distinguished Master Guardian", "Legendary Eagle", "Legendary Eagle Master", "Supreme", "The Global Elite" } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /rang", "hud") register_clcmd("say", "sayhook") register_clcmd("say_team", "tshook") register_event("DeathMsg", "halal", "a") g_vault = nvault_open("namerang") } public hud(id) { if(szint[id] != ASD+1) { client_print(id, print_chat, "Prefix: %s^nĂ–lĂ©sek: %d^nKell mĂ©g: %d",rangok[szint[id]], olesek[id],szamok[szint[id]]-olesek[id] ) } else { client_print(id, print_chat, "Prefix: %s^nĂ–lĂ©sek: %d^nKell mĂ©g: 0",rangok[szint[id]], olesek[id]) } } public sayhook(id) { read_args (message, 191) remove_quotes (message) if (message[0] == '@' || message[0] == '/' || message[0] == '!' || equal (message, "")) { return PLUGIN_CONTINUE } get_user_name(id, nev, 31) if(is_user_alive(id)) { get_user_team(id, color, 9) if(get_user_flags(id) & TULAJ) formatex(Temp, 191, "^x04[Tulajdonos]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & FOADMIN) formatex(Temp, 191, "^x04[FoAdmin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & ADMIN) formatex(Temp, 191, "^x04[Admin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & VIP) formatex(Temp, 191, "^x04[V.I.P]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else formatex(Temp, 191, "^x04%s ^x03%s^x01: %s", rangok[szint[id]], nev, message) } else { get_user_team(id, color, 9) if(get_user_flags(id) & TULAJ) formatex(Temp, 191, "^x04*Halott*[Tulajdonos]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & FOADMIN) formatex(Temp, 191, "^x04*Halott*[FoAdmin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & ADMIN) formatex(Temp, 191, "^x04*Halott*[Admin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & VIP) formatex(Temp, 191, "^x04*Halott*[V.I.P]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else formatex(Temp, 191, "^x04*Halott*%s ^x03%s^x01: %s", rangok[szint[id]], nev, message) } sendmessage(color) return PLUGIN_HANDLED } public tshook(id) { read_args (message, 191) remove_quotes (message) if (message[0] == '@' || message[0] == '/' || message[0] == '!' || equal (message, "")) { return PLUGIN_CONTINUE } get_user_name(id, nev, 31) new playerTeam = get_user_team(id) new playerTeamName[19] switch (playerTeam) { case 1: { copy (playerTeamName, 11, "*T*") } case 2: { copy (playerTeamName, 18, "*CT*") } default: copy (playerTeamName, 9, "*Nézo*") } if(is_user_alive(id)) { get_user_team(id, color, 9) if(get_user_flags(id) & TULAJ) formatex(Temp, 191, "^x04 [Tulajdonos]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & FOADMIN) formatex(Temp, 191, "^x04 [FoAdmin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & ADMIN) formatex(Temp, 191, "^x04 [Admin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & VIP) formatex(Temp, 191, "^x04 [V.I.P]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else formatex(Temp, 191, "^x04*Halott*%s ^x03%s^x01: %s", rangok[szint[id]], nev, message) } else { get_user_team(id, color, 9) if(get_user_flags(id) & TULAJ) formatex(Temp, 191, "^x04*Halott* [Tulajdonos]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & FOADMIN) formatex(Temp, 191, "^x04*Halott* [FoAdmin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & ADMIN) formatex(Temp, 191, "^x04*Halott* [Admin]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else if(get_user_flags(id) & VIP) formatex(Temp, 191, "^x04*Halott* [V.I.P]%s ^x03%s^x04: %s", rangok[szint[id]], nev, message) else formatex(Temp, 191, "^x04*Halott* %s ^x03%s^x01: %s", rangok[szint[id]], nev, message) } sendtmessage(color, playerTeam) return PLUGIN_HANDLED } public sendmessage(color[]) { new teamName[10] for(new player = 1; player < get_maxplayers(); player++) { get_user_team (player, teamName, 9) teamf (player, color) elkuldes(player, Temp) teamf(player, teamName) } } public sendtmessage(color[], playerTeam) { new teamName[10] for (new player = 1; player < get_maxplayers(); player++) { if(get_user_team(player) == playerTeam) { get_user_team (player, teamName, 9) elkuldes(player, Temp) teamf (player, teamName) teamf (player, color) } } } public teamf(player, team[]) { message_begin(MSG_ONE, get_user_msgid("TeamInfo"), _, player) write_byte(player) write_string(team) message_end() } public elkuldes(player, Temp[]) { message_begin( MSG_ONE, get_user_msgid( "SayText" ), _, player) write_byte( player ) write_string( Temp ) message_end() } public client_connect(id) { LoadData(id) } public client_disconnect(id) SaveData(id) public SaveData(id) { new name[32] get_user_name(id, name, 31) new vaultkey[64],vaultdata[256] format(vaultkey,63,"%s-rang", name) format(vaultdata,255,"%i#%i#",olesek[id],szint[id]) nvault_set(g_vault,vaultkey,vaultdata) return PLUGIN_CONTINUE } public LoadData(id) { new name[32] get_user_name(id, name, 31) new vaultkey[64],vaultdata[256] format(vaultkey,63,"%s-rang", name) format(vaultdata,255,"%i#%i#",olesek[id],szint[id]) nvault_get(g_vault,vaultkey,vaultdata,255) replace_all(vaultdata, 255, "#", " ") new oles[32], level[32] parse(vaultdata, oles, 31, level, 31) olesek[id] = str_to_num(oles) szint[id] = str_to_num(level) return PLUGIN_CONTINUE } public halal() { new killer = read_data(1) new victim = read_data(2) if(killer != victim) olesek[killer]++ while(olesek[killer] >= szamok[szint[killer]]) { szint[killer]++ } }
_________________ DeteCT0R írta: Van egy kis baj a pluginnal :DEs orulnek ha a kockak megneznek egy csepet:D ![Kép](https://media.giphy.com/media/aAjpH0r8NWxHi/giphy.gif)
|
|