hlmod.hu https://hlmod.hu/ |
|
Bonuskill átirat hiba https://hlmod.hu/viewtopic.php?f=10&t=2417 |
Oldal: 1 / 1 |
Szerző: | scriptelo [2011.08.26. 12:39 ] |
Hozzászólás témája: | Bonuskill átirat hiba |
sziasztok. meg lenne egy keresem :p Megprobaltam atirni a bonusbombkill plugint, mert az eredeti pluginba nincs benne a headshot kill bonus, es mikor atalakitom akkor kiir nehan hibat . valaki mukodokepesse tudna tenni a plugint ? ![]() SCRIPT: Idézet: #include <amxmodx> #include <cstrike> #include <csx> #define PLUGIN "Bonus Bomb & Kill" #define VERSION "1.7" #define AUTHOR "NupX" const MAX_PLAYERS = 32 // numar total sloturi server new PCvarPlanted new PCvarDefused new PCvarDefusedKit new PCvarExplode new PCvarKnife new PCvarGrenade new pCvarKillMoneyHs new bool:planter[MAX_PLAYERS + 1] // inregistreaza ultimul plantator al bombei public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_dictionary("bonusbombkill.txt") register_cvar("amx_restrict_bonus_knife","1") register_cvar("amx_restrict_bonus_grenade","1") PCvarPlanted = register_cvar("amx_bonus_planted", "1000") PCvarDefused = register_cvar("amx_bonus_defused", "1000") PCvarDefusedKit = register_cvar("amx_bonus_defusedkit", "2000") PCvarExplode = register_cvar("amx_bonus_explode", "2000") PCvarKnife = register_cvar("amx_bonus_knife", "500") PCvarGrenade = register_cvar("amx_bonus_grenade", "500") register_event("HLTV", "NewRound", "a", "1=0", "2=0") } public NewRound() { // reseteaza statusul la fiecare inceput de runda for(new i; i < MAX_PLAYERS + 1; i++) { planter[i] = false } } public client_disconnect(id) { // pentru a nu da banii pentru explozia bombei unui jucator nou intrat ce a ocupat slotul celui ce a plantat if(planter[id]) { planter[id] = false } } public client_death ( killer, victim, wpnindex, hitplace, TK ) // + BONUS - primeste bonus daca iti omori adversarul cu cutitul sau cu grenada, nu primesti daca faci doar dmg { // ti-ai omorat adversarul cu cutitul new restrict_bonus_knife = get_cvar_num("amx_restrict_bonus_knife") new restrict_bonus_grenade = get_cvar_num("amx_restrict_bonus_grenade") new selfkill = (victim == killer) ? true : false if ((!selfkill) && is_user_connected(killer) && restrict_bonus_knife) { if ( wpnindex == CSW_KNIFE ) { new bonus = get_pcvar_num(PCvarKnife) set_money(killer, bonus) static nume[32], nume2[32] get_user_name(killer, nume, 31) get_user_name(victim, nume2, 31) chat_color(0,"%L", 0, "BONUS_KNIFE", nume, bonus, nume2) } } // ti-ai omorat adversarul cu grenada if ((!selfkill) && is_user_connected(killer) && restrict_bonus_grenade) { if ( wpnindex == CSW_HEGRENADE ) { new bonus = get_pcvar_num(PCvarGrenade) set_money(killer, bonus) static nume[32], nume2[32] get_user_name(killer, nume, 31) get_user_name(victim, nume2, 31) chat_color(0,"%L", 0, "BONUS_GRENADE", nume, bonus, nume2) } } } public client_damage ( attacker , victim , damage , wpnindex , hitplace , TA ) // + BONUS - pentru headshot { if ( cs_get_user_deaths(id) == 1 ) { new bonus = get_pcvar_num(pCvarKillMoneyHs) set_money(id, bonus) static nume[32] get_user_name(id,nume,31) } } public bomb_planted(id) // + BONUS - pentru ca a plantat bomba { planter[id] = true new bonus = get_pcvar_num(PCvarPlanted) set_money(id, bonus) static nume[32] get_user_name(id,nume,31) chat_color(0,"%L", 0, "BONUS_BOMB_PLANT", nume, bonus) } public bomb_defused(id) // + BONUS - pentru ca a dezamorsat bomba { // jucatorul care dezamorseaza bomba are defuse kit if ( cs_get_user_defuse(id) == 1 ) { new bonus = get_pcvar_num(PCvarDefusedKit) set_money(id, bonus) static nume[32] get_user_name(id,nume,31) chat_color(0,"%L", 0, "BONUS_BOMB_DEFUSE_KIT", nume, bonus) } // jucatorul care dezamorseaza bomba nu are defuse kit if ( cs_get_user_defuse(id) == 0 ) { new bonus = get_pcvar_num(PCvarDefused) set_money(id, bonus) static nume[32] get_user_name(id,nume,31) chat_color(0,"%L", 0, "BONUS_BOMB_DEFUSE", nume, bonus) } } public bomb_explode(id) // + BONUS - pentru ca a explodat bomba { // sa fim siguri ca e conectat si e cel care a plantat, altfel daca jucatorul se deconecteaza dupa ce a plantat va da eroare if(is_user_connected(id) && planter[id]) { new bonus = get_pcvar_num(PCvarExplode) set_money(id, bonus) static nume[32] get_user_name(id,nume,31) chat_color(0,"%L", 0, "BONUS_BOMB_EXPLODE", nume, bonus) } } set_money(id, bonus) { new money = cs_get_user_money(id) new total = money + bonus if(total < 16000) { cs_set_user_money(id, total) } // pentru a nu da mai multi bani de 16000 else { cs_set_user_money(id, 25000) } } stock chat_color(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!t", "^3") if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]) write_byte(players[i]) write_string(msg) message_end() } } } } HIBA: Idézet: /tmp/text0KvXYw.sma(92) : error 017: undefined symbol "id" /tmp/text0KvXYw.sma(95) : error 017: undefined symbol "id" /tmp/text0KvXYw.sma(95) : warning 215: expression has no effect /tmp/text0KvXYw.sma(95) : error 001: expected token: ";", but found ")" /tmp/text0KvXYw.sma(95) : error 029: invalid expression, assumed zero /tmp/text0KvXYw.sma(95) : fatal error 107: too many error messages on one line Compilation aborted. 5 Errors. A hiba ez miatt van: Idézet: public client_damage ( attacker , victim , damage , wpnindex , hitplace , TA ) // + BONUS - pentru headshot { if ( cs_get_user_deaths(id) == 1 ) { new bonus = get_pcvar_num(pCvarKillMoneyHs) set_money(id, bonus) static nume[32] get_user_name(id,nume,31) } } - ha ezt kiveszed akkor megy a plugin, de ha ezt beillesztem akkor pedig azt a hibat irja ki mit kicsivel fennt irtam. |
Szerző: | Metal [2011.08.27. 00:22 ] |
Hozzászólás témája: | Re: bonuskill |
Igazából az amit kitörölnél, abban nincs is hsre vonatkozó dolgok... ez az összeollósdizás nem olyan egyszerű midnig. |
Szerző: | scriptelo [2011.08.27. 20:45 ] |
Hozzászólás témája: | Re: bonuskill |
s tudnal nekem segiteni ? attudnad ugy irni hogy hsre adjon annyi osszeget amennit beallitok ? |
Szerző: | Metal [2011.08.28. 14:05 ] |
Hozzászólás témája: | Re: bonuskill |
Ahoz van külön plugin az oldalon. Keress rá |
Oldal: 1 / 1 | Minden időpont UTC+02:00 időzóna szerinti |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |