It is currently 15 Dec 2018 08:43






Reply to topic  [ 6 posts ] 
 Eroare compilare 
Author Message
Moderator ajutator
Moderator ajutator
User avatar

Joined: 27 Jul 2015 14:35
Posts: 1120
Location: Mediaş
Detinator Steam: Da
SteamID: sosolino1945
Reputatie: Moderator ajutator
Nume anterior: VioreL @EXTREAMCS
Fond eXtream: 0
https://prnt.sc/kdcrde

imi da eroare la compilare | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <nvault>
#include <fun>

static const
PLUGIN[] = "Simple Level Mod",
VERSION[] = "2.0",
AUTHOR[] = "scosmyn";

#define MAX_LEVELS 15

new const Kills[MAX_LEVELS] =
{
0, //1
50,
150,
250,
400,
550,
350,
450,
550,
750, //2
900, //3
1050, //4
2200, //5
2550, //6
3000 //nu se sterge
}

new const szTag[MAX_LEVELS - 1][] =
{
"Silver I",
"Silver II",
"Silver III",
"Silver IV",
"Silver Elite Master",
"Gold Nova I",
"Gold Nova II",
"Gold Nova III",
"Gold Nova Master",
"Master Guardian I",
"Master Guardian II",
"Master Guardian Elite",
"LEGENDARY EAGLE",
"SUPREME MASTER",
"GLOBAL ELITE"
}

new Level[33],Kill[33],szName[32],g_vault,g_sync
new pcvar_hs,pcvar_kill,pcvar_knife,pcvar_he,pcvar_efect,pcvar_r,pcvar_g,pcvar_b,pcvar_hp_lvl,pcvar_ap_lvl

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("DeathMsg","ev_msg","a")
RegisterHam(Ham_Spawn,"player","player_spawn",1)

pcvar_hs = register_cvar("cvar_hs_bonus","3")
pcvar_kill = register_cvar("cvar_normal_bonus","1")
pcvar_knife = register_cvar("cvar_knife_bonus","3")
pcvar_he = register_cvar("cvar_he_bonus","3")
pcvar_efect = register_cvar("cvar_effect_lvl","3")
pcvar_r = register_cvar("cvar_red","255")
pcvar_g = register_cvar("cvar_green","0")
pcvar_b = register_cvar("cvar_blue","0")
pcvar_hp_lvl = register_cvar("cvar_hp_lvl","5")
pcvar_ap_lvl = register_cvar("cvar_ap_lvl","10")

g_vault = nvault_open("simple_lvl_mod")
g_sync = CreateHudSyncObj()

if(g_vault == INVALID_HANDLE)
set_fail_state("Eroare la deschiderea bazei de date din vault.")
}

public player_spawn(id) {
if(!is_user_alive(id) || is_user_bot(id))
return HAM_HANDLED

if(Level[id] < 1)
Level[id] = 1

set_user_health(id,get_user_health(id) + get_pcvar_num(pcvar_hp_lvl) * Level[id])
set_user_armor(id,get_user_armor(id) + get_pcvar_num(pcvar_ap_lvl) * Level[id])

set_task(0.1,"iteme",id)
return HAM_HANDLED
}

public ev_msg( ) {
static kiler; kiler = read_data(1)
static hs; hs = read_data(3)

if(kiler == read_data(2) || !is_user_alive(kiler))
return

if(hs)
Kill[kiler]+= get_pcvar_num(pcvar_hs)
else
Kill[kiler]+= get_pcvar_num(pcvar_kill)

if(get_user_weapon(kiler) == CSW_KNIFE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_knife)
if(get_user_weapon(kiler) == CSW_HEGRENADE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_he)

if(Level[kiler] < MAX_LEVELS)
{
while(Kill[kiler] >= Kills[Level[kiler]])
{
Level[kiler]++
color(kiler,"!teamFelicitari,ai ajuns la level %i (!g%s!team).",Level[kiler],szTag[Level[kiler]])
screen_fade(kiler, get_pcvar_num(pcvar_efect), get_pcvar_num(pcvar_r), get_pcvar_num(pcvar_g), get_pcvar_num(pcvar_b), 115)
return
}
}
SaveData(kiler)
}

public client_putinserver(id) {
if(!is_user_bot(id))
{
LoadData(id)
set_task(1.0,"show_hud",id+0x4332,_,_,"b")
}
}

public client_disconnect(id) {
remove_task(id+0x4332)
SaveData(id)
}

public show_hud(id) {
id-=0x4332
get_user_name(id,szName,charsmax(szName))

if(is_user_alive(id))
{
set_hudmessage(0, 255, 0, 0.0, 0.24, 0, 6.0, 1.0)
ShowSyncHudMsg(id,g_sync,"Name: %s^nLevel: %d^nStatus: %s^nKill's: %i/%i.",szName,Level[id],szTag[Level[id]],Kill[id],Kills[Level[id]])
}
}

public SaveData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_set(g_vault,vaultkey,vaultdata)
}

public LoadData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_get(g_vault,vaultkey,vaultdata,255)
replace_all(vaultdata, 255, "#", " ")

new kill[32],level[32]
parse(vaultdata, kill, 31, level, 31)
Kill[id] = str_to_num(kill)
Level[id] = str_to_num(level)
}
public plugin_end() nvault_close(g_vault)
public iteme(id) {
switch(Level[id])
{
case 1:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
case 2:
{
give_item(id,"weapon_mp5navy")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
cs_set_user_bpammo(id,CSW_MP5NAVY,120)
}
case 3:
{
if(get_user_team(id) == 1)
{
give_item(id,"weapon_ak47")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_AK47,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
else
{
give_item(id,"weapon_m4a1")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_M4A1,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
}
case 4:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
case 5:
{
random_weapons(id)
}
}
}

stock random_weapons(id) {
new wp = random_num(0,2)

switch(wp)
{
case 0:
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,90)
}
case 1:
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
}
case 2:
{
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
}
}
stock screen_fade(id,holdtime,r,g,b,a)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{ 0, 0, 0 },id);
write_short(seconds_to_units(holdtime));
write_short(seconds_to_units(holdtime));
write_short(0);
write_byte(r);
write_byte(g);
write_byte(b);
write_byte(a);
message_end();
}

stock seconds_to_units(time)
{
return((1 << 12) * (time))
}

stock 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" ) //- verde
replace_all( msg, 190, "!y", "^1" ) //- galben
replace_all( msg, 190, "!team", "^3" ) //- echipa
replace_all( msg, 190, "!n", "^0" ) //- normal

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( );
}
}
}
}


EDIT: Vreau doar cele 15 rankuri din primul plugin si sa fie editat si pluginul acesta cereri-pawn/cerere-plugin-rang-uri-kill-uri-t330264.html dupa cel de mai sus (la grade si killuri ma refer), adica pluginul din cod sa aibe acelasi nr de killuri si aceleasi rankuri..trebuie editat si primul si al doilea plugin....


Last edited by *Or!g!naL* on 13 Sep 2018 17:58, edited 2 times in total.

mutat la modificari



01 Aug 2018 14:35
Profile multumesc
Membru, skill 0
Membru, skill 0
User avatar

Joined: 30 Sep 2017 21:12
Posts: 52
Location: Resita
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Fi mai explicit nu inteleg nimic din ce vrei tu..


Last edited by YONTU on 08 Aug 2018 21:53, edited 1 time in total.

Fii*



01 Aug 2018 23:15
Profile multumesc WWW
Jan Darmu'
Jan Darmu'
User avatar

Joined: 25 Aug 2014 20:31
Posts: 6080
Location: Ploiesti
Detinator Steam: Da
CS Status: All i ever wanted was a Roley Roley
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost Moderator ajutator
Fost Super Moderator
eXtream Mod
Fost Intermediar
Nume anterior : Christmas,
A k c 3 n 7
Fond eXtream: 0
| Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <nvault>
#include <fun>

static const
PLUGIN[] = "Simple Level Mod",
VERSION[] = "2.0",
AUTHOR[] = "scosmyn";

#define MAX_LEVELS 15

new const Kills[MAX_LEVELS] =
{
0, //1
50,
150,
250,
400,
550,
350,
450,
550,
750, //2
900, //3
1050, //4
2200, //5
2550, //6
3000 //nu se sterge
}

new const szTag[MAX_LEVELS][] =
{
"Silver I",
"Silver II",
"Silver III",
"Silver IV",
"Silver Elite Master",
"Gold Nova I",
"Gold Nova II",
"Gold Nova III",
"Gold Nova Master",
"Master Guardian I",
"Master Guardian II",
"Master Guardian Elite",
"LEGENDARY EAGLE",
"SUPREME MASTER",
"GLOBAL ELITE"
}

new Level[33],Kill[33],szName[32],g_vault,g_sync
new pcvar_hs,pcvar_kill,pcvar_knife,pcvar_he,pcvar_efect,pcvar_r,pcvar_g,pcvar_b,pcvar_hp_lvl,pcvar_ap_lvl

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("DeathMsg","ev_msg","a")
RegisterHam(Ham_Spawn,"player","player_spawn",1)

pcvar_hs = register_cvar("cvar_hs_bonus","3")
pcvar_kill = register_cvar("cvar_normal_bonus","1")
pcvar_knife = register_cvar("cvar_knife_bonus","3")
pcvar_he = register_cvar("cvar_he_bonus","3")
pcvar_efect = register_cvar("cvar_effect_lvl","3")
pcvar_r = register_cvar("cvar_red","255")
pcvar_g = register_cvar("cvar_green","0")
pcvar_b = register_cvar("cvar_blue","0")
pcvar_hp_lvl = register_cvar("cvar_hp_lvl","5")
pcvar_ap_lvl = register_cvar("cvar_ap_lvl","10")

g_vault = nvault_open("simple_lvl_mod")
g_sync = CreateHudSyncObj()

if(g_vault == INVALID_HANDLE)
set_fail_state("Eroare la deschiderea bazei de date din vault.")
}

public player_spawn(id) {
if(!is_user_alive(id) || is_user_bot(id))
return HAM_HANDLED

if(Level[id] < 1)
Level[id] = 1

set_user_health(id,get_user_health(id) + get_pcvar_num(pcvar_hp_lvl) * Level[id])
set_user_armor(id,get_user_armor(id) + get_pcvar_num(pcvar_ap_lvl) * Level[id])

set_task(0.1,"iteme",id)
return HAM_HANDLED
}

public ev_msg( ) {
static kiler; kiler = read_data(1)
static hs; hs = read_data(3)

if(kiler == read_data(2) || !is_user_alive(kiler))
return

if(hs)
Kill[kiler]+= get_pcvar_num(pcvar_hs)
else
Kill[kiler]+= get_pcvar_num(pcvar_kill)

if(get_user_weapon(kiler) == CSW_KNIFE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_knife)
if(get_user_weapon(kiler) == CSW_HEGRENADE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_he)

if(Level[kiler] < MAX_LEVELS)
{
while(Kill[kiler] >= Kills[Level[kiler]])
{
Level[kiler]++
color(kiler,"!teamFelicitari,ai ajuns la level %i (!g%s!team).",Level[kiler],szTag[Level[kiler]])
screen_fade(kiler, get_pcvar_num(pcvar_efect), get_pcvar_num(pcvar_r), get_pcvar_num(pcvar_g), get_pcvar_num(pcvar_b), 115)
return
}
}
SaveData(kiler)
}

public client_putinserver(id) {
if(!is_user_bot(id))
{
LoadData(id)
set_task(1.0,"show_hud",id+0x4332,_,_,"b")
}
}

public client_disconnect(id) {
remove_task(id+0x4332)
SaveData(id)
}

public show_hud(id) {
id-=0x4332
get_user_name(id,szName,charsmax(szName))

if(is_user_alive(id))
{
set_hudmessage(0, 255, 0, 0.0, 0.24, 0, 6.0, 1.0)
ShowSyncHudMsg(id,g_sync,"Name: %s^nLevel: %d^nStatus: %s^nKill's: %i/%i.",szName,Level[id],szTag[Level[id]],Kill[id],Kills[Level[id]])
}
}

public SaveData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_set(g_vault,vaultkey,vaultdata)
}

public LoadData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_get(g_vault,vaultkey,vaultdata,255)
replace_all(vaultdata, 255, "#", " ")

new kill[32],level[32]
parse(vaultdata, kill, 31, level, 31)
Kill[id] = str_to_num(kill)
Level[id] = str_to_num(level)
}
public plugin_end() nvault_close(g_vault)
public iteme(id) {
switch(Level[id])
{
case 1:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
case 2:
{
give_item(id,"weapon_mp5navy")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
cs_set_user_bpammo(id,CSW_MP5NAVY,120)
}
case 3:
{
if(get_user_team(id) == 1)
{
give_item(id,"weapon_ak47")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_AK47,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
else
{
give_item(id,"weapon_m4a1")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_M4A1,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
}
case 4:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
case 5:
{
random_weapons(id)
}
}
}

stock random_weapons(id) {
new wp = random_num(0,2)

switch(wp)
{
case 0:
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,90)
}
case 1:
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
}
case 2:
{
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
}
}
stock screen_fade(id,holdtime,r,g,b,a)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{ 0, 0, 0 },id);
write_short(seconds_to_units(holdtime));
write_short(seconds_to_units(holdtime));
write_short(0);
write_byte(r);
write_byte(g);
write_byte(b);
write_byte(a);
message_end();
}

stock seconds_to_units(time)
{
return((1 << 12) * (time))
}

stock 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" ) //- verde
replace_all( msg, 190, "!y", "^1" ) //- galben
replace_all( msg, 190, "!team", "^3" ) //- echipa
replace_all( msg, 190, "!n", "^0" ) //- normal

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( );
}
}
}
}

_________________
ImageImage

Lista intermediari
Nu ezita sa ma contactezi la 112 pentru interventii speciale: S.I.A.S
REGULI GENERALE
REGULILE SECTIUNII ANUNTURI



02 Aug 2018 02:49
Profile multumesc
Moderator ajutator
Moderator ajutator
User avatar

Joined: 27 Jul 2015 14:35
Posts: 1120
Location: Mediaş
Detinator Steam: Da
SteamID: sosolino1945
Reputatie: Moderator ajutator
Nume anterior: VioreL @EXTREAMCS
Fond eXtream: 0
Sorinel wrote:
| Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <nvault>
#include <fun>

static const
PLUGIN[] = "Simple Level Mod",
VERSION[] = "2.0",
AUTHOR[] = "scosmyn";

#define MAX_LEVELS 15

new const Kills[MAX_LEVELS] =
{
0, //1
50,
150,
250,
400,
550,
350,
450,
550,
750, //2
900, //3
1050, //4
2200, //5
2550, //6
3000 //nu se sterge
}

new const szTag[MAX_LEVELS][] =
{
"Silver I",
"Silver II",
"Silver III",
"Silver IV",
"Silver Elite Master",
"Gold Nova I",
"Gold Nova II",
"Gold Nova III",
"Gold Nova Master",
"Master Guardian I",
"Master Guardian II",
"Master Guardian Elite",
"LEGENDARY EAGLE",
"SUPREME MASTER",
"GLOBAL ELITE"
}

new Level[33],Kill[33],szName[32],g_vault,g_sync
new pcvar_hs,pcvar_kill,pcvar_knife,pcvar_he,pcvar_efect,pcvar_r,pcvar_g,pcvar_b,pcvar_hp_lvl,pcvar_ap_lvl

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("DeathMsg","ev_msg","a")
RegisterHam(Ham_Spawn,"player","player_spawn",1)

pcvar_hs = register_cvar("cvar_hs_bonus","3")
pcvar_kill = register_cvar("cvar_normal_bonus","1")
pcvar_knife = register_cvar("cvar_knife_bonus","3")
pcvar_he = register_cvar("cvar_he_bonus","3")
pcvar_efect = register_cvar("cvar_effect_lvl","3")
pcvar_r = register_cvar("cvar_red","255")
pcvar_g = register_cvar("cvar_green","0")
pcvar_b = register_cvar("cvar_blue","0")
pcvar_hp_lvl = register_cvar("cvar_hp_lvl","5")
pcvar_ap_lvl = register_cvar("cvar_ap_lvl","10")

g_vault = nvault_open("simple_lvl_mod")
g_sync = CreateHudSyncObj()

if(g_vault == INVALID_HANDLE)
set_fail_state("Eroare la deschiderea bazei de date din vault.")
}

public player_spawn(id) {
if(!is_user_alive(id) || is_user_bot(id))
return HAM_HANDLED

if(Level[id] < 1)
Level[id] = 1

set_user_health(id,get_user_health(id) + get_pcvar_num(pcvar_hp_lvl) * Level[id])
set_user_armor(id,get_user_armor(id) + get_pcvar_num(pcvar_ap_lvl) * Level[id])

set_task(0.1,"iteme",id)
return HAM_HANDLED
}

public ev_msg( ) {
static kiler; kiler = read_data(1)
static hs; hs = read_data(3)

if(kiler == read_data(2) || !is_user_alive(kiler))
return

if(hs)
Kill[kiler]+= get_pcvar_num(pcvar_hs)
else
Kill[kiler]+= get_pcvar_num(pcvar_kill)

if(get_user_weapon(kiler) == CSW_KNIFE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_knife)
if(get_user_weapon(kiler) == CSW_HEGRENADE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_he)

if(Level[kiler] < MAX_LEVELS)
{
while(Kill[kiler] >= Kills[Level[kiler]])
{
Level[kiler]++
color(kiler,"!teamFelicitari,ai ajuns la level %i (!g%s!team).",Level[kiler],szTag[Level[kiler]])
screen_fade(kiler, get_pcvar_num(pcvar_efect), get_pcvar_num(pcvar_r), get_pcvar_num(pcvar_g), get_pcvar_num(pcvar_b), 115)
return
}
}
SaveData(kiler)
}

public client_putinserver(id) {
if(!is_user_bot(id))
{
LoadData(id)
set_task(1.0,"show_hud",id+0x4332,_,_,"b")
}
}

public client_disconnect(id) {
remove_task(id+0x4332)
SaveData(id)
}

public show_hud(id) {
id-=0x4332
get_user_name(id,szName,charsmax(szName))

if(is_user_alive(id))
{
set_hudmessage(0, 255, 0, 0.0, 0.24, 0, 6.0, 1.0)
ShowSyncHudMsg(id,g_sync,"Name: %s^nLevel: %d^nStatus: %s^nKill's: %i/%i.",szName,Level[id],szTag[Level[id]],Kill[id],Kills[Level[id]])
}
}

public SaveData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_set(g_vault,vaultkey,vaultdata)
}

public LoadData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_get(g_vault,vaultkey,vaultdata,255)
replace_all(vaultdata, 255, "#", " ")

new kill[32],level[32]
parse(vaultdata, kill, 31, level, 31)
Kill[id] = str_to_num(kill)
Level[id] = str_to_num(level)
}
public plugin_end() nvault_close(g_vault)
public iteme(id) {
switch(Level[id])
{
case 1:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
case 2:
{
give_item(id,"weapon_mp5navy")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
cs_set_user_bpammo(id,CSW_MP5NAVY,120)
}
case 3:
{
if(get_user_team(id) == 1)
{
give_item(id,"weapon_ak47")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_AK47,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
else
{
give_item(id,"weapon_m4a1")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_M4A1,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
}
case 4:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
case 5:
{
random_weapons(id)
}
}
}

stock random_weapons(id) {
new wp = random_num(0,2)

switch(wp)
{
case 0:
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,90)
}
case 1:
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
}
case 2:
{
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
}
}
stock screen_fade(id,holdtime,r,g,b,a)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{ 0, 0, 0 },id);
write_short(seconds_to_units(holdtime));
write_short(seconds_to_units(holdtime));
write_short(0);
write_byte(r);
write_byte(g);
write_byte(b);
write_byte(a);
message_end();
}

stock seconds_to_units(time)
{
return((1 << 12) * (time))
}

stock 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" ) //- verde
replace_all( msg, 190, "!y", "^1" ) //- galben
replace_all( msg, 190, "!team", "^3" ) //- echipa
replace_all( msg, 190, "!n", "^0" ) //- normal

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( );
}
}
}
}

nu imi apare acel mesaj hud de jos cu Level, Rank etc..
dupa imi poate modifica cineva si la celelalt plugin sa aibe acelasi rank si hp ca celelalt. sa coincida pluginele intre ele


03 Aug 2018 14:43
Profile multumesc
Moderator ajutator
Moderator ajutator
User avatar

Joined: 27 Jul 2015 14:35
Posts: 1120
Location: Mediaş
Detinator Steam: Da
SteamID: sosolino1945
Reputatie: Moderator ajutator
Nume anterior: VioreL @EXTREAMCS
Fond eXtream: 0
https://prnt.sc/kel11g vreau ca lista de sus sa fie mutata jos deasupra la HP/AP iar formatul sa fie in lista hud cu verde: NAME: LEVEL: RANK: KILLS:

Nu arata la toti playerii infoirmatiile, poate rearanjati putin codul va rog
puteti pune level cu denumireaa in rosu şi rank cu tot cu numele rankului in turcuaz?

Upp cine ma ajuta cu aceste 2 plugine? MS


04 Aug 2018 12:54
Profile multumesc
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 13:25
Posts: 2864
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
| Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <nvault>
#include <fun>

static const
PLUGIN[] = "Simple Level Mod",
VERSION[] = "2.0",
AUTHOR[] = "scosmyn";

new const Kills[] =
{
0, //1
50,
150,
250,
400,
550,
350,
450,
550,
750, //2
900, //3
1050, //4
2200, //5
2550, //6
3000 //nu se sterge
}

new const szTag[][] =
{
"Silver I",
"Silver II",
"Silver III",
"Silver IV",
"Silver Elite Master",
"Gold Nova I",
"Gold Nova II",
"Gold Nova III",
"Gold Nova Master",
"Master Guardian I",
"Master Guardian II",
"Master Guardian Elite",
"LEGENDARY EAGLE",
"SUPREME MASTER",
"GLOBAL ELITE"
}

new Level[33],Kill[33],szName[32],g_vault,g_sync
new pcvar_hs,pcvar_kill,pcvar_knife,pcvar_he,pcvar_efect,pcvar_r,pcvar_g,pcvar_b,pcvar_hp_lvl,pcvar_ap_lvl

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("DeathMsg","ev_msg","a")
RegisterHam(Ham_Spawn,"player","player_spawn",1)

pcvar_hs = register_cvar("cvar_hs_bonus","3")
pcvar_kill = register_cvar("cvar_normal_bonus","1")
pcvar_knife = register_cvar("cvar_knife_bonus","3")
pcvar_he = register_cvar("cvar_he_bonus","3")
pcvar_efect = register_cvar("cvar_effect_lvl","3")
pcvar_r = register_cvar("cvar_red","255")
pcvar_g = register_cvar("cvar_green","0")
pcvar_b = register_cvar("cvar_blue","0")
pcvar_hp_lvl = register_cvar("cvar_hp_lvl","5")
pcvar_ap_lvl = register_cvar("cvar_ap_lvl","10")

g_vault = nvault_open("simple_lvl_mod")
g_sync = CreateHudSyncObj()

if(g_vault == INVALID_HANDLE)
set_fail_state("Eroare la deschiderea bazei de date din vault.")
}

public player_spawn(id) {
if(!is_user_alive(id) || is_user_bot(id))
return HAM_HANDLED

if(Level[id] < 1)
Level[id] = 1

set_user_health(id,get_user_health(id) + get_pcvar_num(pcvar_hp_lvl) * Level[id])
set_user_armor(id,get_user_armor(id) + get_pcvar_num(pcvar_ap_lvl) * Level[id])

set_task(0.1,"iteme",id)
return HAM_HANDLED
}

public ev_msg( ) {
static kiler; kiler = read_data(1)
static hs; hs = read_data(3)

if(kiler == read_data(2) || !is_user_alive(kiler))
return

if(hs)
Kill[kiler]+= get_pcvar_num(pcvar_hs)
else
Kill[kiler]+= get_pcvar_num(pcvar_kill)

if(get_user_weapon(kiler) == CSW_KNIFE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_knife)
if(get_user_weapon(kiler) == CSW_HEGRENADE && !hs)
Kill[kiler]+= get_pcvar_num(pcvar_he)

if(Level[kiler] < sizeof(Kills))
{
while(Kill[kiler] >= Kills[Level[kiler]])
{
Level[kiler]++
color(kiler,"!teamFelicitari,ai ajuns la level %i (!g%s!team).",Level[kiler],szTag[Level[kiler]])
screen_fade(kiler, get_pcvar_num(pcvar_efect), get_pcvar_num(pcvar_r), get_pcvar_num(pcvar_g), get_pcvar_num(pcvar_b), 115)
return
}
}
SaveData(kiler)
}

public client_putinserver(id) {
if(!is_user_bot(id))
{
LoadData(id)
set_task(1.0,"show_hud",id+0x4332,_,_,"b")
}
}

public client_disconnect(id) {
remove_task(id+0x4332)
SaveData(id)
}

public show_hud(id) {
id-=0x4332
get_user_name(id,szName,charsmax(szName))

if(is_user_alive(id))
{
set_hudmessage(0, 255, 0, 0.0, 0.24, 0, 6.0, 1.0)
ShowSyncHudMsg(id,g_sync,"Name: %s^nLevel: %d^nRank: %s^nKill's: %i/%i.",szName,Level[id],szTag[Level[id]],Kill[id],Kills[Level[id]])
}
}

public SaveData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_set(g_vault,vaultkey,vaultdata)
}

public LoadData(id)
{
new name[32],vaultkey[64],vaultdata[256]
get_user_name(id,name,charsmax(name))
formatex(vaultkey,63,"%s-Mod",name)
formatex(vaultdata,255,"%i#%i#",Kill[id],Level[id])
nvault_get(g_vault,vaultkey,vaultdata,255)
replace_all(vaultdata, 255, "#", " ")

new kill[32],level[32]
parse(vaultdata, kill, 31, level, 31)
Kill[id] = str_to_num(kill)
Level[id] = str_to_num(level)
}
public plugin_end() nvault_close(g_vault)
public iteme(id) {
switch(Level[id])
{
case 1:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
case 2:
{
give_item(id,"weapon_mp5navy")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
cs_set_user_bpammo(id,CSW_MP5NAVY,120)
}
case 3:
{
if(get_user_team(id) == 1)
{
give_item(id,"weapon_ak47")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_AK47,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
else
{
give_item(id,"weapon_m4a1")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_M4A1,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
}
}
case 4:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
case 5:
{
random_weapons(id)
}
}
}

stock random_weapons(id) {
new wp = random_num(0,2)

switch(wp)
{
case 0:
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,90)
}
case 1:
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
}
case 2:
{
give_item(id,"weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
}
}
}
stock screen_fade(id,holdtime,r,g,b,a)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{ 0, 0, 0 },id);
write_short(seconds_to_units(holdtime));
write_short(seconds_to_units(holdtime));
write_short(0);
write_byte(r);
write_byte(g);
write_byte(b);
write_byte(a);
message_end();
}

stock seconds_to_units(time)
{
return((1 << 12) * (time))
}

stock 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" ) //- verde
replace_all( msg, 190, "!y", "^1" ) //- galben
replace_all( msg, 190, "!team", "^3" ) //- echipa
replace_all( msg, 190, "!n", "^0" ) //- normal

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( );
}
}
}
}

_________________
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage

Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
Creez pluginuri contra cost


31 Aug 2018 15:27
Profile multumesc YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group