jak dodac do tego pluginu to zeby jak ktos awansuje to zeby mu dodawwalo expa?
Załączone pliki
-
bfrank.sma 1,64 KB
7 Ilość pobrań
bfrank.amxx
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.
|
Napisano 02.04.2013 09:05
Napisano 03.04.2013 20:26
#include <amxmodx>
#include <csx>
#include <codmod>
new ranganum[27];
new ranga[][] =
{
"Brak",
"Szeregowy",
"Starszy Szeregowy",
"Kapral",
"Starszy Kapral",
"Plutonowy",
"Starszy Plutonowy",
"Sierzant",
"Sierzant Sztabowy",
"Starszy Sierzant",
"Starszy Sierzant Sztabowy",
"Mlodszy Chorazy",
"Mlodszy Chorazy Sztabowy",
"Chorazy",
"Starszy Chorazy",
"Chorazy Sztabowy",
"Starszy Chorazy Sztabowy",
"Podporucznik",
"Porucznik",
"Kapitan",
"Major",
"Podpulkownik",
"Pulkownik",
"General Brygady",
"General Dywizji",
"General Broni",
"General"
}
new rangaxp[27] =
{
0,
20,
80,
180,
300,
450,
600,
780,
890,
1000,
1150,
1400,
1690,
1900,
2200,
2600,
3000,
4000,
4700,
6500,
8500,
11000,
15000,
25000,
35000,
50000,
99999
}
new xptoadd;
public plugin_init()
{
register_plugin("BF Ranks", "0.1", "Rivit");
register_event( "ResetHUD", "eventUpdateStatus", "be");
register_event( "StatusValue", "eventUpdateStatus", "be", "1=1" ,"2=0");
xptoadd = register_cvar("cod_xp_awans", "10")
}
public eventUpdateStatus(id)
{
if(is_user_bot(id))
return;
static stats[8], body[8]
get_user_stats(id, stats, body)
while(stats[0] >= rangaxp[ranganum[id]])
{
ranganum[id]++
cod_set_user_xp(id, cod_get_user_xp(id)+get_pcvar_num(xptoadd))
client_print(id, print_chat, "*** Wlasnie awansowales na: %s (+%i Expa) ***", ranga[ranganum[id]], get_pcvar_num(xptoadd));
}
showStatus(id, "Zabicia: %d/%d Stopien: %s", stats[0], rangaxp[ranganum[id]], ranga[ranganum[id]]);
}
stock showStatus(id, const szStatus[], ...)
{
new szBuffer[128];
vformat(szBuffer, 127, szStatus, 3);
static msgStatusText = 0;
if(!msgStatusText)
msgStatusText = get_user_msgid("StatusText");
message_begin(MSG_ONE, msgStatusText, _, id);
write_byte(0);
write_string(szBuffer);
message_end();
}
Napisano 04.04.2013 10:56
new addtoxp[27] = { 0, 2000, 8000, 18000, 30000, 45000, 60000, 78000, 89000, 100000, 1150, 1400, 1690, 1900, 2200, 2600, 3000, 4000, 4700, 6500, 8500, 11000, 15000, 25000, 35000, 50000, 99999 }
Napisano 04.04.2013 20:50
#include <amxmodx>
#include <csx>
#include <codmod>
new ranganum[27];
new ranga[][] =
{
"Brak",
"Szeregowy",
"Starszy Szeregowy",
"Kapral",
"Starszy Kapral",
"Plutonowy",
"Starszy Plutonowy",
"Sierzant",
"Sierzant Sztabowy",
"Starszy Sierzant",
"Starszy Sierzant Sztabowy",
"Mlodszy Chorazy",
"Mlodszy Chorazy Sztabowy",
"Chorazy",
"Starszy Chorazy",
"Chorazy Sztabowy",
"Starszy Chorazy Sztabowy",
"Podporucznik",
"Porucznik",
"Kapitan",
"Major",
"Podpulkownik",
"Pulkownik",
"General Brygady",
"General Dywizji",
"General Broni",
"General"
}
new rangaxp[27] =
{
0,
20,
80,
180,
300,
450,
600,
780,
890,
1000,
1150,
1400,
1690,
1900,
2200,
2600,
3000,
4000,
4700,
6500,
8500,
11000,
15000,
25000,
35000,
50000,
99999
}
new rangaxpadd[27] =
{
0,
20,
80,
180,
300,
450,
600,
780,
890,
1000,
1150,
1400,
1690,
1900,
2200,
2600,
3000,
4000,
4700,
6500,
8500,
11000,
15000,
25000,
35000,
50000,
99999
}
public plugin_init()
{
register_plugin("BF Ranks", "0.1", "Rivit");
register_event( "ResetHUD", "eventUpdateStatus", "be");
register_event( "StatusValue", "eventUpdateStatus", "be", "1=1" ,"2=0");
}
public eventUpdateStatus(id)
{
if(is_user_bot(id))
return;
static stats[8], body[8]
get_user_stats(id, stats, body)
while(stats[0] >= rangaxp[ranganum[id]])
{
ranganum[id]++
cod_set_user_xp(id, cod_get_user_xp(id)+rangaxpadd[ranganum[id]])
client_print(id, print_chat, "*** Wlasnie awansowales na: %s (+%i Expa) ***", ranga[ranganum[id]], rangaxpadd[ranganum[id]]);
}
showStatus(id, "Zabicia: %d/%d Stopien: %s", stats[0], rangaxp[ranganum[id]], ranga[ranganum[id]]);
}
stock showStatus(id, const szStatus[], ...)
{
new szBuffer[128];
vformat(szBuffer, 127, szStatus, 3);
static msgStatusText = 0;
if(!msgStatusText)
msgStatusText = get_user_msgid("StatusText");
message_begin(MSG_ONE, msgStatusText, _, id);
write_byte(0);
write_string(szBuffer);
message_end();
}
Napisano 06.04.2013 13:27
Posiadam TBM (inaczej PTB), które działa dużo lepiej niż zwykłe PTB, nawet na modach z lvlami. Zainteresowany? Proszę bardzo
0 użytkowników, 1 gości, 0 anonimowych