Jump to content

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Posted Image Posted Image

Guest Message by DevFuse
 

sandking91's Content

There have been 15 items by sandking91 (Search limited from 27.06.2023)


Sort by                Order  

#411473 Start Line: ./hlds_i686 // Debug.log (ERROR)

Posted by sandking91 on 17.05.2012 14:19 in Multilingual

Hmm, do you have anny errors in amx logs?



#411469 new error QTM_codmod.

Posted by sandking91 on 17.05.2012 14:18 in Multilingual

Could u show me whole sma? To check which lines are wrong?



#410893 Moneymod Save issue

Posted by sandking91 on 15.05.2012 19:02 in Multilingual

Try setting this cvar to "2"
amx_savestyle 2 /// autosave by 1sid 2nick 3ip



#409539 Start Line: ./hlds_i686 // Debug.log (ERROR)

Posted by sandking91 on 12.05.2012 15:29 in Multilingual

Try to set sys_ticrate to lower value.



#409533 [SOLVED] Battlefield 2 Rank Mod

Posted by sandking91 on 12.05.2012 15:24 in Multilingual

bf2_badgepowers 1
Set it and it will work.



#409531 [SOLVED] Admin exp ---> Cod mod

Posted by sandking91 on 12.05.2012 15:22 in Multilingual

U have to install plugin and u will have both setting lvl and adding expierience.
http://amxx.pl/topic...dmin-menu-v-15/



#407145 [ROZWIĄZANE] Poszukuje /daj /daj2 Pilnie!

Posted by sandking91 on 06.05.2012 07:56 in Szukam pluginu

Musisz kompilować lokalnie i mieć biblioteczkę codmod.inc pod 2 perki.



#406081 Admin Menu - v 1.5

Posted by sandking91 on 04.05.2012 07:04 in Poradniki, Łatki oraz Pluginy

Proszę, masz na 2 perki.
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <amxmisc>
new opcja, gracz_id[33], wybrany;
new ilosc[33], name[33], nazwa_perku[256], nazwa_klasy[256];
public plugin_init() {
register_plugin("COD Admin Menu", "6", "MieTeK");

register_clcmd("say /codadmin", "AM", ADMIN_IMMUNITY);
register_clcmd("ile","pobierz");

}

public AM(id)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
return PLUGIN_HANDLED;
new tytul[64];
format(tytul, 63, "\rCOD Admin Menu \wby MieTeK");
new menu = menu_create(tytul, "AM_handler");
menu_additem(menu, "Dodaj \rEXP");//1
menu_additem(menu, "Ustaw \rLVL");//2
menu_additem(menu, "Daj \rItem");//3
menu_additem(menu, "Daj \rItem2");//4
menu_additem(menu, "Zamien \rEXP");//5
menu_additem(menu, "Zsumuj \rEXP");//6
menu_additem(menu, "Przenies \r EXP");//7
menu_additem(menu, "Wlacz \r EXP EVENT");//8



menu_display(id, menu);

return PLUGIN_HANDLED;
}
public AM_handler(id, menu, item)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

switch(item)
{
case 0:
{
Gracz(id);
opcja = 1;
}
case 1:
{
Gracz(id);
opcja = 2;
}
case 2:
{
Gracz(id);
opcja = 3;
}
case 3:
{
Gracz(id);
opcja = 8;
}
case 4:
{
Gracz(id);
opcja = 5;
}
case 5:
{
Gracz(id);
opcja = 6;
}
case 6:
{
Gracz(id);
opcja = 7;
}
case 7:
{
client_cmd (id, "say /event")
}
case 8:
{
Gracz(id);
opcja = 8;
}
}

return PLUGIN_CONTINUE;
}
public Gracz(id)
{
new menu = menu_create("Wybierz gracza:", "Gracz_handler");

for(new i=0, n=0; i<=32; i++)
{
if(!is_user_connected(i))
continue;
gracz_id[n++] = i;
new nazwa_gracza[64];
get_user_name(i, nazwa_gracza, 63)
menu_additem(menu, nazwa_gracza, "0", 0);
}
menu_display(id, menu);
}
public Gracz_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

wybrany = gracz_id[item];
get_user_name(wybrany, name, 32);

if(opcja == 3)
wybierz_perk(id);
else if (opcja == 8)
wybierz_perk1(id);
else if(opcja == 4 || opcja == 5 || opcja == 6)
wybierz_klase(id);
else
console_cmd(id, "messagemode ile");

return PLUGIN_HANDLED;
}

public pobierz(id)
{
new text[192]
read_argv(1,text,191)
format(ilosc, charsmax(ilosc), "%s", text);
dawaj(id)
}

public dawaj(id)
{
if(opcja == 1)
{
cod_set_user_xp(wybrany, cod_get_user_xp(wybrany)+str_to_num(ilosc));
client_print(id, print_chat, "Ustawiles graczowi %s %i EXP", name, str_to_num(ilosc));
}
if(opcja == 2)
{
new potrzeba;
potrzeba = cod_get_level_xp(str_to_num(ilosc)-1);
cod_set_user_xp(wybrany, potrzeba);

client_print(id, print_chat, "Ustawiles graczowi %s %i LVL", name, str_to_num(ilosc));
}
}
public wybierz_klase(id)
{
new tytul[64];
format(tytul, sizeof(tytul), "\rNa jaka klase :");
new menu = menu_create(tytul, "wybierz_klase_handler");
for(new i=1; i<=cod_get_classes_num(); i++)
{
cod_get_class_name(i, nazwa_klasy, 255)
menu_additem(menu, nazwa_klasy)
}

menu_display(id, menu);
}
public wybierz_klase_handler(id, menu, item)
{
if(item++ == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_CONTINUE;
}
new klasa[2][65];

if(opcja == 4)
{
new exp = cod_get_user_xp(wybrany);
cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64);
cod_set_user_xp(wybrany, 0);
cod_set_user_class(wybrany, item, 1);
cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64);
cod_set_user_xp(wybrany, exp);
client_print(id, print_chat, "Przeniosles EXP graczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]);
}
if(opcja == 5)
{
new exp = cod_get_user_xp(wybrany);
new oldclass = cod_get_user_class(wybrany)
cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64);
cod_set_user_class(wybrany, item, 1);
new exp2 = cod_get_user_xp(wybrany);
cod_set_user_xp(wybrany, exp);
cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64);
cod_set_user_class(wybrany, oldclass, 1);
cod_set_user_xp(wybrany, exp2);
cod_set_user_class(wybrany, item, 1);
client_print(id, print_chat, "Zamieniles EXP graczowi %s miedzy klasa %s a klasa %s", name, klasa[0], klasa[1]);
}
if(opcja == 6)
{
new exp = cod_get_user_xp(wybrany);
cod_set_user_xp(wybrany, 0);
cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64);
cod_set_user_class(wybrany, item, 1);
cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64);
cod_set_user_xp(wybrany, cod_get_user_xp(wybrany)+exp);
client_print(id, print_chat, "Zsumowales EXP graczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]);
}
if(opcja == 7)
{ client_cmd(id, "say /event");

}

return PLUGIN_CONTINUE;
}
public wybierz_perk(id)
{
new tytul[64];
format(tytul, 63, "\rWybierz perk :");
new menu = menu_create(tytul, "wybierz_perk_handler");
for(new i=1; i<=cod_get_perks_num(); i++)
{
cod_get_perk_name(i, nazwa_perku, 255)
menu_additem(menu, nazwa_perku);
}

menu_display(id, menu);
}
public wybierz_perk_handler(id, menu, item)
{
if(item++ == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

cod_set_user_perk(wybrany, item, -1, 0);
cod_get_perk_name(item++, nazwa_perku, 255);

client_print(id, print_chat, "Dales graczowi %s perk %s", name, nazwa_perku);

return PLUGIN_HANDLED;
}
public wybierz_perk1(id)
{
new tytul[64];
format(tytul, 63, "\rWybierz perk :");
new menu = menu_create(tytul, "wybierz_perk_handler_1");
for(new i=1; i<=cod_get_perks_num(); i++)
{
cod_get_perk_name(i, nazwa_perku, 255)
menu_additem(menu, nazwa_perku);
}

menu_display(id, menu);
}
public wybierz_perk_handler_1(id, menu, item)
{
if(item++ == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

cod_set_user_perk(wybrany, item, 0, 0, 1);
cod_get_perk_name(item++, nazwa_perku, 255);

client_print(id, print_chat, "Dales graczowi %s perk %s", name, nazwa_perku);

return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/



#404079 How to install this??

Posted by sandking91 on 30.04.2012 17:21 in Multilingual

Ok i know what is going on. :)

These modifications are made for Superhero mod and u are using another mod. If u want it to add xp to cod mod write it and i will write it.



#404057 How to install this??

Posted by sandking91 on 30.04.2012 16:26 in Multilingual

What mod do u use? These both plugins are working with superhero mod :)



#404049 COD_CLASS Help!

Posted by sandking91 on 30.04.2012 16:07 in Multilingual

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
	    
new const nazwa[]   = "Almirante (Admin Clase)";
new const opis[]    = "Triple Jump";
new const bronie    = (1<<CSW_FAMAS)|(1<<CSW_MP5NAVY)|(1<<CSW_DEAGLE);
new const zdrowie   = 35;
new const kondycja  = 20;
new const inteligencja = 20;
new const wytrzymalosc = 30;
    
new skoki[33];

new ma_klase[33];

public plugin_init()
{
    register_plugin(nazwa, "1.0", "amxx.pl");

    cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
   
    register_forward(FM_CmdStart, "fwCmdStart_MultiJump");

}

public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_F))
{
  client_print(id, print_chat, "[Almirante] Solo los admins pueden selecionar esta clase.")
  return COD_STOP;
}

ma_klase[id] = true;
return COD_CONTINUE;
}

public cod_class_disabled(id)
{
    ma_klase[id] = false;

}

public fwCmdStart_MultiJump(id, uc_handle)
{
    if(!is_user_alive(id) || !ma_klase[id])
        return FMRES_IGNORED;

    new flags = pev(id, pev_flags);

    if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
    {
        skoki[id]--;
        new Float:velocity[3];
        pev(id, pev_velocity,velocity);
        velocity[2] = random_float(265.0,285.0);
        set_pev(id, pev_velocity,velocity);
    }
    else if(flags & FL_ONGROUND)
        skoki[id] = 3;

    return FMRES_IGNORED;
}

Here u are :)
+ for it would be nice ;)



#404031 Cod Admin Menu na 2 perki

Posted by sandking91 on 30.04.2012 15:40 in Problemy

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <amxmisc>
#include <colorchat_p>
new opcja, gracz_id[33], wybrany;
new ilosc[33], name[33], nazwa_perku[256], nazwa_klasy[256];
public plugin_init() {
register_plugin("COD Admin Menu", "6", "MieTeK");

register_clcmd("say /codadmin", "AM", ADMIN_IMMUNITY);
register_clcmd("ile","pobierz");

}

public AM(id)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
return PLUGIN_HANDLED;
new tytul[64];
format(tytul, 63, "\rCOD Admin Menu \wby MieTeK /Edit by Es(cs-brejk.eu)");
new menu = menu_create(tytul, "AM_handler");
menu_additem(menu, "Dodaj \rEXP");//1
menu_additem(menu, "Ustaw \rLVL");//2
menu_additem(menu, "Daj \rItem");//3
menu_additem(menu, "Daj \rItem2");//4
menu_additem(menu, "Zamien \rEXP");//5
menu_additem(menu, "Zsumuj \rEXP");//6
menu_additem(menu, "Przenies \r EXP");//7
menu_additem(menu, "Wlacz \r EXP EVENT");//8


menu_display(id, menu);

return PLUGIN_HANDLED;
}
public AM_handler(id, menu, item)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

switch(item)
{
case 0:
{
Gracz(id);
opcja = 1;
}
case 1:
{
Gracz(id);
opcja = 2;
}
case 2:
{
Gracz(id);
opcja = 3;
}
case 3:
{
Gracz(id);
opcja = 8;
}
case 4:
{
Gracz(id);
opcja = 5;
}
case 5:
{
Gracz(id);
opcja = 6;
}
case 6:
{
Gracz(id);
opcja = 7;
}
case 7:
{
client_cmd (id, "say /event")
}
}

return PLUGIN_CONTINUE;
}
public Gracz(id)
{
new menu = menu_create("Wybierz gracza:", "Gracz_handler");

for(new i=0, n=0; i<=32; i++)
{
if(!is_user_connected(i))
continue;
gracz_id[n++] = i;
new nazwa_gracza[64];
get_user_name(i, nazwa_gracza, 63)
menu_additem(menu, nazwa_gracza, "0", 0);
}
menu_display(id, menu);
}
public Gracz_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

wybrany = gracz_id[item];
get_user_name(wybrany, name, 32);

if(opcja == 3)
wybierz_perk(id);
else if (opcja == 8)
wybierz_perk1(id);
else if(opcja == 4 || opcja == 5 || opcja == 6)
wybierz_klase(id);
else
console_cmd(id, "messagemode ile");

return PLUGIN_HANDLED;
}

public pobierz(id)
{
new text[192]
read_argv(1,text,191)
format(ilosc, charsmax(ilosc), "%s", text);
dawaj(id)
}

public dawaj(id)
{
if(opcja == 1)
{
cod_set_user_xp(wybrany, cod_get_user_xp(wybrany)+str_to_num(ilosc));
client_print(id, print_chat, "Ustawiles graczowi %s %i EXP", name, str_to_num(ilosc));
}
if(opcja == 2)
{
new potrzeba;
potrzeba = cod_get_level_xp(str_to_num(ilosc)-1);
cod_set_user_xp(wybrany, potrzeba);

client_print(id, print_chat, "Ustawiles graczowi %s %i LVL", name, str_to_num(ilosc));
}
}
public wybierz_klase(id)
{
new tytul[64];
format(tytul, sizeof(tytul), "\rNa jaka klase :");
new menu = menu_create(tytul, "wybierz_klase_handler");
for(new i=1; i<=cod_get_classes_num(); i++)
{
cod_get_class_name(i, nazwa_klasy, 255)
menu_additem(menu, nazwa_klasy)
}

menu_display(id, menu);
}
public wybierz_klase_handler(id, menu, item)
{
if(item++ == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_CONTINUE;
}
new klasa[2][65];

if(opcja == 4)
{
new exp = cod_get_user_xp(wybrany);
cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64);
cod_set_user_xp(wybrany, 0);
cod_set_user_class(wybrany, item, 1);
cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64);
cod_set_user_xp(wybrany, exp);
(id, print_chat, "Przeniosles EXP graczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]);
ColorChat(id, print_chat, "Przeniosles !zEXP !cgraczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]) ;);
}
if(opcja == 5)
{
new exp = cod_get_user_xp(wybrany);
new oldclass = cod_get_user_class(wybrany)
cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64);
cod_set_user_class(wybrany, item, 1);
new exp2 = cod_get_user_xp(wybrany);
cod_set_user_xp(wybrany, exp);
cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64);
cod_set_user_class(wybrany, oldclass, 1);
cod_set_user_xp(wybrany, exp2);
cod_set_user_class(wybrany, item, 1);
client_print(id, print_chat, "Zamieniles EXP graczowi %s miedzy klasa %s a klasa %s", name, klasa[0], klasa[1]);
}
if(opcja == 6)
{
new exp = cod_get_user_xp(wybrany);
cod_set_user_xp(wybrany, 0);
cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64);
cod_set_user_class(wybrany, item, 1);
cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64);
cod_set_user_xp(wybrany, cod_get_user_xp(wybrany)+exp);
client_print(id, print_chat, "Zsumowales EXP graczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]);
}
if(opcja == 7)
{ client_cmd(id, "say /event");

}
return PLUGIN_CONTINUE;
}
public wybierz_perk(id)
{
new tytul[64];
format(tytul, 63, "\rWybierz perk :");
new menu = menu_create(tytul, "wybierz_perk_handler");
for(new i=1; i<=cod_get_perks_num(); i++)
{
cod_get_perk_name(i, nazwa_perku, 255)
menu_additem(menu, nazwa_perku);
}

menu_display(id, menu);
}
public wybierz_perk_handler(id, menu, item)
{
if(item++ == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

cod_set_user_perk(wybrany, item, -1, 0);
cod_get_perk_name(item++, nazwa_perku, 255);

client_print(id, print_chat, "Dales graczowi %s perk %s", name, nazwa_perku);

return PLUGIN_HANDLED;
}
public wybierz_perk1(id)
{
new tytul[64];
format(tytul, 63, "\rWybierz perk :");
new menu = menu_create(tytul, "wybierz_perk_handler_1");
for(new i=1; i<=cod_get_perks_num(); i++)
{
cod_get_perk_name(i, nazwa_perku, 255)
menu_additem(menu, nazwa_perku);
}

menu_display(id, menu);
}
public wybierz_perk_handler_1(id, menu, item)
{
if(item++ == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

cod_set_user_perk(wybrany, item, 0, 0, 1);
cod_get_perk_name(item++, nazwa_perku, 255);

client_print(id, print_chat, "Dales graczowi %s perk %s", name, nazwa_perku);

return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/


Łap



#404014 Sklep i /wymien na 2 perki

Posted by sandking91 on 30.04.2012 15:10 in Problemy

Jakie... MI kompiluje bez problemu.



#403999 Sklep i /wymien na 2 perki

Posted by sandking91 on 30.04.2012 14:52 in Problemy

Powinno działać.
#include <amxmodx>
#include <codmod>
#include <engine>
#include <cstrike>
#include <fun>
#include <colorchat_p>
public plugin_init()
{
register_plugin("CodShop by MieTeK", "1.0", "MieTeK");

register_clcmd("say /sklep", "Sklep");
register_clcmd("say /shop", "Sklep");
register_clcmd("say /s", "Sklep");
}
public Sklep(id)
{
new tytul[25];
format(tytul, 24, "\rSklep by \yMieTeK");
new menu = menu_create(tytul, "Sklep_Handler");
menu_additem(menu, "Ibuprofen \r[Leczy 10 HP] \yKoszt: \r1500$");//1
menu_additem(menu, "Fenacetyna \r[Leczy 25 HP] \yKoszt: \r3000$");//2
menu_additem(menu, "Tramal \r[Leczy 50 HP] \yKoszt: \r6000$");//3
menu_additem(menu, "Amfetamina \r[Wyzej skaczesz] \yKoszt: \r16000$");//4
menu_additem(menu, "Lotto \r[Losowanie bonusow] \yKoszt: \r16000$");//5
menu_additem(menu, "Doswiadczenie \r[Dostajesz losowy EXP] \yKoszt: \r16000$");//6
menu_additem(menu, "Losuj perk#1 \r[Dostajesz losowy perk] \yKoszt: \r10000$");//7
menu_additem(menu, "Losuj perk#2 \r[Dostajesz losowy perk slotu 2] \yKoszt: \r10000$");//7
menu_display(id, menu);

}
public Sklep_Handler(id, menu, item)
{

if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;

new zdrowie = get_user_health(id);
new kasa = cs_get_user_money(id);
new maxzdrowie = cod_get_user_health(id)+100

if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}

switch(item)
{
case 0:
{
if(kasa >= 1500)
{
new nowe_zdrowie = (zdrowie+10);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-1500);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "[L4G-COD] Uleczono Cie o 10 hp!");
}
if(nowe_zdrowie > maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-1500);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "[L4G-COD] Jestes w pelni uleczony!");
}

}
else
client_print(id, print_chat, "[L4G-COD] Masz za malo kasy!");
}
case 1:
{
if(kasa >= 3000)
{
new nowe_zdrowie = (zdrowie+25);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-3000);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "[L4G-COD] Uleczono Cie o 25 hp!");
}
if(nowe_zdrowie >= maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-3000);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "[L4G-COD] Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, "[L4G-COD] Masz za malo kasy!");
}
case 2:
{
if(kasa >= 6000)
{
new nowe_zdrowie = (zdrowie+50);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-6000);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "[L4G-COD] Uleczono Cie o 50 hp!");
}
if(nowe_zdrowie >= maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-6000);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "[L4G-COD] Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, "[L4G-COD] Masz za malo kasy!");
}
case 3:
{
if(kasa >= 16000)
{
cs_set_user_money(id, kasa-16000);
set_user_gravity(id, 0.5);
client_print(id, print_chat, "[L4G-COD] Skaczesz wyzej!");
}
if(kasa < 16000)
client_print(id, print_chat, "[L4G-COD] Masz za malo kasy!");
}
case 4:
{

if(kasa >= 16000)
{
cs_set_user_money(id, kasa-16000);
client_print(id, print_chat, "[L4G-COD] Trwa losowanie!");
new totek = random_num(0, 10);

switch(totek)
{
case 0:
{
new moneybonus = random_num(500,5000);
client_print(id, print_chat, "[L4G-COD] Wygrales kase %i$!", moneybonus);
cs_set_user_money(id, moneybonus);
}
case 1:
{
new moneybonus = random_num(5000,16000);
client_print(id, print_chat, "[L4G-COD] Wygrales super kase %i$!", moneybonus);
cs_set_user_money(id, moneybonus);
}
case 2:
{
set_user_gravity(id, get_user_gravity(id)-0.3);
client_print(id, print_chat, "[L4G-COD] Wygrales nizsza grawitacje!");
}
case 3:
client_print(id, print_chat, "[L4G-COD] Niestety nic nie wygrales!");
case 4:
{
new bonusxp = random_num(15,75);
cod_set_user_xp(id, cod_get_user_xp(id)+bonusxp);
client_print(id, print_chat, "[L4G-COD] Wygrales %i dodatkowego EXP'a !", bonusxp);
}
case 5:
{
cod_set_user_perk(id, -1, -1, 1);
client_print(id, print_chat, "[L4G-COD] Wygrales losowy perk!");
}
case 6:
{
new healthbonus = random_num(10,55);
set_user_health(id, get_user_health(id)+healthbonus);
client_print(id, print_chat, "[L4G-COD] Wygrales %i dodatkowego HP!", healthbonus);
}
case 7:
{
new healthbonus = random_num(10,30);
set_user_health(id, get_user_health(id)-healthbonus);
client_print(id, print_chat, "[L4G-COD] Straciles %i HP!", healthbonus);
}
case 8:
client_print(id, print_chat, "[L4G-COD] Niestety nic nie wygrales !");
case 9:
{
new xpbonus = random_num(75,150);
cod_set_user_xp(id, cod_get_user_xp(id)+xpbonus);
client_print(id, print_chat, "[L4G-COD] Wygrales %i dodatkowego EXP'a!", xpbonus);
}
case 10:
{
cs_set_user_money(id, 16000);
client_print(id, print_chat, "[L4G-COD] Nic nie wygrales, ale kasa sie zwrocila!");
}

}
}
if(kasa < 16000)
client_print(id, print_chat, "[L4G-COD] Masz za malo kasy!");
}
case 5:
{
if(kasa >= 16000)
{
new exp = cod_get_user_xp(id);
new losowy = random_num(15, 30);
cs_set_user_money(id, kasa-16000);
cod_set_user_xp(id, exp+losowy)
client_print(id, print_chat, "[L4G-COD] Dostales %i EXP'a!", losowy);
}
if(kasa < 16000)
client_print(id, print_chat, "[L4G-COD] Masz za malo kasy!");
}
case 6:
{
if(kasa >= 10000)
{
cs_set_user_money(id, kasa-10000);
cod_set_user_perk(id, -1, -1, 1, 0);
ColorChat(id, RED, "!z[COD:MW3]!n Kupiles !closowy perk !");
}
if(kasa < 10000)
ColorChat(id, RED, "!z[COD:MW3]!n Masz za mało kasy");
}
case 7:
{
if(kasa >= 10000)
{
cs_set_user_money(id, kasa-10000);
cod_set_user_perk(id, -1, -1, 1, 1);
ColorChat(id, RED, "!z[COD:MW3]!n Kupiles !closowy perk !");
}
if(kasa < 10000)
ColorChat(id, RED, "!z[COD:MW3]!n Masz za mało kasy");
}
}
return PLUGIN_CONTINUE;
}



#403991 [SOLVED] need help!

Posted by sandking91 on 30.04.2012 14:40 in Multilingual

Here u are :)
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
		  
new const nazwa[]   = "Francotirador Pro (PREMIUM)";
new const opis[]		= "Tiene 1 misil, Se hace invisible con cuchillo (agachado y quieto), Salto triple, Mata istantaneo con cuchillo, 33% de matar instantaneo con SCOUT.";
new const bronie		= (1<<CSW_AWP) | (1<<CSW_SCOUT) | (1<<CSW_DEAGLE);
new const zdrowie   = 0;
new const kondycja  = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;

new sprite_blast;
new ilosc_rakiet_gracza[33];
new poprzednia_rakieta_gracza[33];
new skoki[33];
new ostatnio_prawym[33];
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_PlayerPreThink, "fwPrethink_Niewidzialnosc", 1);
register_touch("rocket", "*" , "DotykRakiety");
RegisterHam(Ham_Spawn, "player", "fwSpawn_Rakiety", 1);

register_forward(FM_CmdStart, "fwCmdStart_MultiJump");

RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage_JedenZ");

RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage_JedenCios");
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fwPrimaryAttack_JedenCios");
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fwSecondaryAttack_JedenCios");
}
public plugin_precache()
{
sprite_blast = precache_model("sprites/dexplo.spr");
precache_model("models/rpgrocket.mdl");
}
public client_disconnect(id)
{
new entRakiety = find_ent_by_class(0, "rocket");
while(entRakiety > 0)
{
  if(entity_get_edict(entRakiety, EV_ENT_owner) == id)
   remove_entity(entRakiety);
  entRakiety = find_ent_by_class(entRakiety, "rocket");
}
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
  client_print(id, print_chat, "[Francotirador Pro (PREMIUM)] Nie masz uprawnien, aby uzywac tej klasy.")
  return COD_STOP;
}
ilosc_rakiet_gracza[id] = 1;
ma_klase[id] = true;

return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
		 ma_klase[id] = false;
}
public cod_class_skill_used(id)
{
if (!ilosc_rakiet_gracza[id])
{
  client_print(id, print_center, "No tienes mas misiles!");
}
else
{
  if(poprzednia_rakieta_gracza[id] + 2.0 > get_gametime())
  {
   client_print(id, print_center, "Rakiet mozesz uzywac co 2 sekundy!");
  }
  else
  {
   if (is_user_alive(id))
   {
		poprzednia_rakieta_gracza[id] = floatround(get_gametime());
		ilosc_rakiet_gracza[id]--;
		new Float: Origin[3], Float: vAngle[3], Float: Velocity[3];
		entity_get_vector(id, EV_VEC_v_angle, vAngle);
		entity_get_vector(id, EV_VEC_origin , Origin);
		new Ent = create_entity("info_target");
		entity_set_string(Ent, EV_SZ_classname, "rocket");
		entity_set_model(Ent, "models/rpgrocket.mdl");
		vAngle[0] *= -1.0;
		entity_set_origin(Ent, Origin);
		entity_set_vector(Ent, EV_VEC_angles, vAngle);
		entity_set_int(Ent, EV_INT_effects, 2);
		entity_set_int(Ent, EV_INT_solid, SOLID_BBOX);
		entity_set_int(Ent, EV_INT_movetype, MOVETYPE_FLY);
		entity_set_edict(Ent, EV_ENT_owner, id);
		VelocityByAim(id, 1000 , Velocity);
		entity_set_vector(Ent, EV_VEC_velocity ,Velocity);
   }
  }
}
}
stock fm_get_speed(entity)
{
static Float:velocity[3]
pev(entity, pev_velocity, velocity)
return floatround(vector_length(velocity))
}
//Przy kucaniu
public fwPrethink_Niewidzialnosc(id)
{
if(!ma_klase[id])
  return;
new button = get_user_button(id);
if( button & IN_DUCK && get_user_weapon(id) == CSW_KNIFE && fm_get_speed(id) < 10)
{
  set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 20);
}
else
{
  set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
}
}
public fwSpawn_Rakiety(id)
{
if(is_user_alive(id))
  ilosc_rakiet_gracza[id] = 1;
}
public DotykRakiety(ent)
{
if (!is_valid_ent(ent))
  return;
new attacker = entity_get_edict(ent, EV_ENT_owner);

new Float:fOrigin[3];
entity_get_vector(ent, EV_VEC_origin, fOrigin);
new iOrigin[3];
for(new i=0;i<3;i++)
  iOrigin[i] = floatround(fOrigin[i]);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();
new entlist[33];
new numfound = find_sphere_class(ent, "player", 190.0, entlist, 32);
for (new i=0; i < numfound; i++)
{
  new pid = entlist[i];
  if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid))
   continue;
  cod_inflict_damage(attacker, pid, 55.0, 0.9, ent, (1<<24));
}
remove_entity(ent);
}
public fwCmdStart_MultiJump(id, uc_handle)
{
if(!is_user_alive(id) || !ma_klase[id])
  return FMRES_IGNORED;
new flags = pev(id, pev_flags);
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
{
  skoki[id]--;
  new Float:velocity[3];
  pev(id, pev_velocity,velocity);
  velocity[2] = random_float(265.0,285.0);
  set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
  skoki[id] = 3;
return FMRES_IGNORED;
}
public fwTakeDamage_JedenZ(this, idInf, idAtt, Float:fDmg, dmgBits){
if(!is_user_alive(idAtt) || !ma_klase[idAtt] || !(dmgBits & (1<<1) ) || random_num(1, 3) != 1 )
  return HAM_IGNORED;
cs_set_user_armor(this, 0, CS_ARMOR_NONE);
SetHamParamFloat(4, float(get_user_health(this) + 1));
return HAM_HANDLED;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
		if(!is_user_connected(idattacker))
				return HAM_IGNORED;
		
		if(!ma_klase[idattacker])
				return HAM_IGNORED;
		
		if(damagebits & DMG_BULLET)
		{
				new weapon = get_user_weapon(idattacker);
				
				if(weapon == CSW_SCOUT && damage > 20.0 && random_num(1,3) == 1)
						cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
						
		}
		
		return HAM_IGNORED;
}

public fwPrimaryAttack_JedenCios(ent)
{
new id = pev(ent, pev_owner);
ostatnio_prawym[id] = 1;
}
public fwSecondaryAttack_JedenCios(ent)
{
new id = pev(ent, pev_owner);
ostatnio_prawym[id] = 0;
}