plugin içinden modeli kaldırma

Konu

#1
Ekteki sma nın içerisinden modeli kaldırabilirmisiniz model olmamasını istiyorum
.sma nexoxpmod.sma (Dosya Boyutu: 14,14 KB | İndirme Sayısı: 3)
#2
bütün modellerimi ?
#3
(02-02-2020, 23:59)nexogaming Adlı Kullanıcıdan Alıntı: Ekteki sma nın içerisinden modeli kaldırabilirmisiniz model olmamasını istiyorum


Denermisin?


PHP Kod:
#include <amxmodx>
#include <nvault>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

#define g_exp(%1) get_pcvar_num(xpm_start) + (seviye[%1] * get_pcvar_num(xpm_inc))
#define DLIGHT_LIFE 8
#define DLIGHT_DECAY 60
#define message_begin_f(%1,%2,%3) (engfunc (EngFunc_MessageBegin, %1, %2, %3))
#define write_coord_f(%1) (engfunc (EngFunc_WriteCoord, %1))
#define FLAG ADMIN_KICK

new xpm_3drank

new gi_PlayerRank 33 ]

new 
xpkayit,seviye[33] = 1,exp[33],xpm_kill,xpm_knife,xpm_headshot,xpm_maxlevel,hud_info,xpm_inc,xpm_start,xpm_heal_up,xpm_damage_up,aim_goster,g_iMsgSayText,hud_show,rutbe[33]
new const 
level[] = "explevel/seviye_atlama.wav"
new const tag[] = "!g[ NeXo GaminG ]!y"
new const is[] = "%"
enum Coord_e {Float:xFloat:yFloat:z};

enum
{
ER,
ONBASI,
CAVUS,
TEGMEN,
YUZBASI,
BINBASI,
YARBAY,
ALBAY,
GENERAL    
}
public 
plugin_init() {
    
register_plugin("Xp-Mod v2.1 |NeXoGaminG""1.5""NexoGaminG")
    
xpm_start register_cvar("xpm_start""200");
    
xpm_inc register_cvar("xpm_inc""50");
    
xpm_kill register_cvar("xpm_kill","15")
    
xpm_knife register_cvar("xpm_knife","25")
    
xpm_headshot register_cvar("xpm_headshot","35")
    
xpm_maxlevel register_cvar("xpm_maxlevel","25")
    
xpm_heal_up register_cvar("xpm_heal_up","1")
    
xpm_damage_up register_cvar("xpm_damage_up","1")
    
xpkayit nvault_open("xpmod_kayit")
    
xpm_3drank register_cvar "xpm_3drank""1" )
    
register_clcmd("__xpm_maxlevel","__xpm_maxlevel_devam")
    
register_clcmd("__xpm_kill","__xpm_kill_devam")
    
register_clcmd("__xpm_inc","__xpm_inc_devam")
    
register_clcmd("__xpm_headshot","__xpm_headshot_devam")
    
register_clcmd("__xpm_knife","__xpm_knife_devam")
    
register_clcmd("__xpm_damage_up","__xpm_damage_devam")
    
register_clcmd("__xpm_heal_up","__xpm_heal_devam")
    
register_clcmd("say /xpreset","xpmod_reset")
    
register_clcmd("say /xpkontrol","xpmod_kontrol")
    
register_clcmd("/xpkontrol","xpmod_kontrol")
    
register_event("DeathMsg""event_death""a");
    
register_event("StatusValue""showStatus""be""1=2""2!0")
    
register_event("StatusValue""hideStatus""be""1=1""2=0")
    
RegisterHam(Ham_Spawn,         "player""Fwd_PlayerSpawn_Post",    1)
    
RegisterHam(Ham_TakeDamage,     "player""FwdTakeDamage",         0)
    
hud_show CreateHudSyncObj();
    
hud_info CreateHudSyncObj();
    
aim_goster CreateHudSyncObj()
    
g_iMsgSayText     get_user_msgid("SayText"
}
public 
xpmod_reset(id){
    
seviye[id] = 1
    exp
[id] = 0
    ChatColor
(id,"%s !tleveliniz!y ve !texp (tecrube)!y puaniniz basariyla sifirlanmistir.",tag)
}
public 
plugin_precache() {
    
precache_sound("fvox/beep.wav")
    
precache_sound(level)
}
public 
kaydet(id){
    new 
name[64],key[72], stats[34];
    
get_user_name(idname63);
    
formatex(key71"%s-stats"name);
    
formatex(stats33"%i#%i#"seviye[id], exp[id]);
    
nvault_set(xpkayitkeystats);
}
public 
kontrol(id){
    new 
name[32]
    
get_user_name(id,name,31)
    if(
exp[id] >= g_exp(id)){
        
seviye[id]++    
        
exp[id] = 0
        ChatColor
(0,"%s !t'%s'!y adli oyuncu !g[%d]!y levele ulasti.",tag,name,seviye[id])
        
level_atlama(id)
    }
    else if(
exp[id] < g_exp(id))
    {
        
console_cmd(id,"spk fvox/beep")    
    }
}
public 
yukle(id){
    new 
name[64],key[72], stats[34], stat[3][12];
    
get_user_name(idname63);
    
formatex(key71"%s-stats"name);
    
nvault_get(xpkayitkeystats33);
    
replace_all(stats 33"#"" ")
    
parse(statsstat[0], 11stat[1], 11);
    
seviye[id] = str_to_num(stat[0]);
    
exp[id] = str_to_num(stat[1]);    
    if(
seviye[id] == 0){
        
seviye[id] = 1
    
}
}
public 
client_authorized(id){
    
seviye[id]=1
    exp
[id] = 0
    set_task
(1.0"show_explevel"id__"b")
    
yukle(id)
    
create_rank_entity id )
}
public 
client_disconnect(id){
    
kaydet(id)
    if ( 
gi_PlayerRank id ] > )
        
engfunc EngFunc_RemoveEntitygi_PlayerRank id ] )
    
    
gi_PlayerRank id ] = 0
}
public 
create_rank_entity index )
{    
    
gi_PlayerRank index ] = engfunc EngFunc_CreateNamedEntityengfunc EngFunc_AllocString"info_target" ) )
    
    
set_pev gi_PlayerRank index ], pev_movetypeMOVETYPE_FOLLOW )
    
set_pev gi_PlayerRank index ], pev_aimentindex )
    
set_pev gi_PlayerRank index ], pev_rendermodekRenderNormal )
    
set_pev gi_PlayerRank index ], pev_renderfxkRenderFxGlowShell )
    
set_pev gi_PlayerRank index ], pev_renderamt5.0 )
    
}
public 
event_death(){
    
    
//new attacker = read_data(1);
    
new victim read_data(2);
    new 
attacker get_user_attacker(victim)
    new 
miktar[32] = 
    
if ( is_valid_player attacker ) )
    {
        
check_rank attacker )
    }
    if(
attacker == victim)
    {
        return 
PLUGIN_HANDLED;
    }
    if(
seviye[attacker] >= get_pcvar_num(xpm_maxlevel)){
        
ChatColor(attacker,"%s !tmaximum!y levele ulastiniz.",tag)
        return 
PLUGIN_HANDLED;
    }
    
exp[attacker] += get_pcvar_num(xpm_kill)
    
miktar[attacker] += get_pcvar_num(xpm_kill)
    if(
get_pdata_int(victim75) == HIT_HEAD){
        
exp[attacker] += get_pcvar_num(xpm_headshot)
        
miktar[attacker] += get_pcvar_num(xpm_headshot)
    }
    if(
get_user_weapon(attacker) == CSW_KNIFE){
        
exp[attacker] += get_pcvar_num(xpm_knife)
        
miktar[attacker] += get_pcvar_num(xpm_knife)
    }
    
ChatColor(attacker,"%s !t%d!y exp (tecrube) puani kazandiniz.",tag,miktar[attacker])
    
kontrol(attacker)
    return 
PLUGIN_HANDLED;
}
public 
show_explevel(id){
    if(!
is_user_alive(id))
    return 
PLUGIN_HANDLED;
    new 
ly[33],ey[33],as[33],show[33]
    as[
id] = get_pcvar_num(xpm_start) + (seviye[id] * get_pcvar_num(xpm_inc))
    
ly[id] = seviye[id] * 100 get_pcvar_num(xpm_maxlevel
    
ey[id] = exp[id] * 100 / as[id]
    if(
ly[id] < 6){
    
rutbe[id] = ER
    show 
"ER"
    
}
    else if(
ly[id] < 16 ){
    
rutbe[id] = ONBASI
    show 
"ONBASI"
    
}
    else if(
ly[id] < 31 ){
    
rutbe[id] = CAVUS
    show 
"CAVUS"
    
}
    else if(
ly[id] < 46 ){
    
rutbe[id] = TEGMEN
    show 
"TEGMEN"
    
}
    else if(
ly[id] < 61 ){
    
rutbe[id] = YUZBASI
    show 
"YUZBASI"
    
}
    else if(
ly[id] < 71 ){
    
rutbe[id] = BINBASI
    show 
"BINBASI"
    
}
    else if(
ly[id] < 81 ){
    
rutbe[id] = YARBAY
    show 
"YARBAY"
    
}
    else if(
ly[id] < 91 ){
    
rutbe[id] = ALBAY
    show 
"ALBAY"
    
}
    else if(
ly[id] <= 100){
    
rutbe[id] = GENERAL    
    show 
"GENERAL"
    
}
    
set_hudmessage255000.900.1506.03.00.11.5 );
    
ShowSyncHudMsg(idhud_show,"Exp/Level" );
    
set_hudmessage020500.900.1806.03.00.11.5 );
    
ShowSyncHudMsg(idhud_info"Level: [%d/%d] - (%s%i) ^nExp: [%i/%i] - (%s%i) ^nRutbe: [%s]",seviye[id],get_pcvar_num(xpm_maxlevel),is,ly[id],exp[id],g_exp(id),is,ey[id],show);
    return 
PLUGIN_HANDLED
}
public 
showStatus(id){
    new 
name[32], pid read_data(2)
    
get_user_name(pid,name,31)
    if(!
is_user_bot(id) && is_user_connected(id)) {
        if(
get_user_team(pid) == 1){
            
set_hudmessage(255,25,25, -1.00.5500.013.00.010.01, -1)
            
ShowSyncHudMsg(idaim_goster"%s | Hp: %d | Level: %d",name,get_user_health(pid),seviye[pid])
        }
        else if(
get_user_team(pid) == 2){
            
set_hudmessage(25,25,255, -1.00.5500.013.00.010.01, -1)
            
ShowSyncHudMsg(idaim_goster"%s | Hp: %d | Level: %d",name,get_user_health(pid),seviye[pid])
        }
    }
}
public 
hideStatus(id){
    
ClearSyncHud(idaim_goster)
}
public 
Fwd_PlayerSpawn_Post(player){
    new 
hp
    hp 
seviye[player] * 1
    
if(get_pcvar_num(xpm_heal_up) && is_user_alive(player)){
        
set_user_health(playerget_user_health(player) + hp )
    }
    if ( 
is_valid_player player ) && get_pcvar_num(xpm_3drank))
    {
        
check_rank player )
    }
    else if(!
get_pcvar_num(xpm_3drank))
    {
    if ( 
gi_PlayerRank player ] > )
        
engfunc EngFunc_RemoveEntitygi_PlayerRank player ] )
    
    
gi_PlayerRank [player ] = 0    
    
}
}
public 
FwdTakeDamage(victiminflictorattackerFloat:damagedamage_bits){
    new 
dmg seviyeattacker ] * 1
    
if(get_pcvar_num(xpm_damage_up)){
        
SetHamParamFloatdamage dmg )
        
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED
}
stock level_atlama(id){
    static 
Float:FOrigin3[3// PARLAMA EFEKTI
    
pev(idpev_originFOrigin3)
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYFOrigin30)
    
write_byte(TE_IMPLOSION)
    
engfunc(EngFunc_WriteCoordFOrigin3[0])
    
engfunc(EngFunc_WriteCoordFOrigin3[1])
    
engfunc(EngFunc_WriteCoordFOrigin3[2])
    
write_byte(200)
    
write_byte(100)
    
write_byte(5)  
    message_end
()
    
emit_sound(idCHAN_VOICElevel1.0ATTN_NORM0PITCH_NORM)
    
level_atlama__(id)
}
public 
level_atlama__(id){
    
//new const Invoker
    
static Coord_e:vecOrigin [Coord_e];
    
pev (id,pev_originvecOrigin);

    
message_begin_f (MSG_PVSSVC_TEMPENTITYvecOrigin0);
    
write_byte (TE_DLIGHT);
    
write_coord_f (vecOrigin []);
    
write_coord_f (vecOrigin []);
    
write_coord_f (vecOrigin []);
    
write_byte (35);
    
write_byte (250);
    
write_byte (150);
    
write_byte (15);
    
write_byte (DLIGHT_LIFE);
    
write_byte (DLIGHT_DECAY);
    
message_end();
        
    
return FMRES_HANDLED;
}
public 
xpmod_kontrol(id)
{
    if(
get_user_flags(id) & ADMIN_CVAR)
    {
        static 
Item[64]
        
        
formatex(Itemcharsmax(Item),"\yXpmod | Kontrol Paneli"
        new 
Menu menu_create(Item"takim_menu")
        
        
formatex(Itemcharsmax(Item),"\wxpm_maxlevel \d'%d'",get_pcvar_num(xpm_maxlevel))
        
menu_additem(MenuItem"1")
        
        
formatex(Itemcharsmax(Item),"\wxpm_kill \d'%d'",get_pcvar_num(xpm_kill))
        
menu_additem(MenuItem"2")
        
        
formatex(Itemcharsmax(Item),"\wxpm_inc \d'%d'",get_pcvar_num(xpm_inc))
        
menu_additem(MenuItem"3")
        
        
formatex(Itemcharsmax(Item),"\wxpm_headshot \d'%d'",get_pcvar_num(xpm_headshot))
        
menu_additem(MenuItem"5")
        
        
formatex(Itemcharsmax(Item),"\wxpm_knife \d'%d'",get_pcvar_num(xpm_knife))
        
menu_additem(MenuItem"6")
        
        
formatex(Itemcharsmax(Item),"\wxpm_damage_up \d'%s'",get_pcvar_num(xpm_damage_up) > "Acik" "Kapali")
        
menu_additem(MenuItem"6")
        
        
formatex(Itemcharsmax(Item),"\wxpm_heal_up \d'%s'",get_pcvar_num(xpm_heal_up) > "Acik" "Kapali")
        
menu_additem(MenuItem"7")
        
        
        
        
        
        
menu_setprop(MenuMPROP_EXITMEXIT_ALL)
        
menu_display(idMenu)
    }
    else
    {
        
ChatColor(id,"[%s]!gYetkiniz !yBulunmamaktadir...",tag)
    }
    return 
PLUGIN_HANDLED
}
public 
takim_menu(idmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
Data[6], Name[64]
    new 
AccessCallback
    
new say[300]
    
read_args(saycharsmax(say))
    
    
menu_item_getinfo(menuitemAccessData,5Name63Callback)
    
    new 
Key str_to_num(Data)
    
    switch (
Key)
    {
        case 
1:
        {    
        
client_cmd(id"messagemode __xpm_maxlevel")
        }
        case 
2
        {    
        
client_cmd(id"messagemode __xpm_kill")    
        }
        case 
3:
        {    
        
client_cmd(id"messagemode __xpm_inc")    
        }
        case 
4
        {    
        
client_cmd(id"messagemode __xpm_headshot")    
        }
        case 
5
        {    
        
client_cmd(id"messagemode __xpm_knife")    
        }
        case 
6
        {
        
client_cmd(id"messagemode __xpm_damage_up")
        }
        case 
7
        {    
        
client_cmd(id"messagemode __xpm_heal_up")    
        }
        
    }
    
menu_destroy(menu)    
    return 
PLUGIN_HANDLED
}
public 
__xpm_maxlevel_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_maxlevel %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_kill_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_kill %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_inc_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_inc %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_headshot_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_headshot %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_knife_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_knife %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_heal_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_damage_up %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_damage_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_heal_up %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
check_rank index )
{
    new 
PlayerRank get_player_rank index )
    
    
set_pev gi_PlayerRank index ], pev_bodyPlayerRank )
    
    switch ( 
PlayerRank )
    {
        case 
123:
        {
            
set_pev gi_PlayerRank index ], pev_rendercolor, { 255.0255.0255.0 } )
        }
        
        case 
12:
        {
            
set_pev gi_PlayerRank index ], pev_rendercolor, { 255.00.00.0 } )
        }
        
        default:
        {
            
set_pev gi_PlayerRank index ], pev_rendercolor, { 255.0255.00.0 } )
        }
    }
}

stock get_player_rank index )
{
    new 
PlayerFrags rutbeindex ]
    
    switch ( 
PlayerFrags )
    {
        case 
ER:
        {
            return 
1
        
}
        
        case 
ONBASI:
        {
            return 
2
        
}
        
        case 
CAVUS:
        {
            return 
3
        
}
        
        case 
TEGMEN:
        {
            return 
4
        
}
        
        case 
YUZBASI:
        {
            return 
5
        
}
        
        case 
BINBASI:
        {
            return 
6
        
}
        
        case 
YARBAY:
        {
            return 
7
        
}
        
        case 
ALBAY:
        {
            return 
8
        
}
        
        case 
GENERAL:
        {
            return 
9
        
}
        
        default:
        {
            return 
10
        
}
    }
    
    return 
0
}

stock is_valid_player index )
{
    if ( 
is_user_connected index ) && <= index <= 32 )
    {
        return 
true
    
}
    
    return 
false
}
stock ChatColor(const id, const input[], any:...){
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!t""^3"// Team Color
    
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_iMsgSayText_players[i])  
            write_byte
(players[i]);
            
write_string(msg);
            
message_end();
        }
    }
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 
İletişim bilgilerim;
  • Whatsapp: 0850 308 3156 (7/24)
  • linkedin
#4
(03-02-2020, 01:54)MawiLarq Adlı Kullanıcıdan Alıntı:
(02-02-2020, 23:59)nexogaming Adlı Kullanıcıdan Alıntı: Ekteki sma nın içerisinden modeli kaldırabilirmisiniz model olmamasını istiyorum


Denermisin?


PHP Kod:
#include <amxmodx>
#include <nvault>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

#define g_exp(%1) get_pcvar_num(xpm_start) + (seviye[%1] * get_pcvar_num(xpm_inc))
#define DLIGHT_LIFE 8
#define DLIGHT_DECAY 60
#define message_begin_f(%1,%2,%3) (engfunc (EngFunc_MessageBegin, %1, %2, %3))
#define write_coord_f(%1) (engfunc (EngFunc_WriteCoord, %1))
#define FLAG ADMIN_KICK

new xpm_3drank

new gi_PlayerRank 33 ]

new 
xpkayit,seviye[33] = 1,exp[33],xpm_kill,xpm_knife,xpm_headshot,xpm_maxlevel,hud_info,xpm_inc,xpm_start,xpm_heal_up,xpm_damage_up,aim_goster,g_iMsgSayText,hud_show,rutbe[33]
new const 
level[] = "explevel/seviye_atlama.wav"
new const tag[] = "!g[ NeXo GaminG ]!y"
new const is[] = "%"
enum Coord_e {Float:xFloat:yFloat:z};

enum
{
ER,
ONBASI,
CAVUS,
TEGMEN,
YUZBASI,
BINBASI,
YARBAY,
ALBAY,
GENERAL    
}
public 
plugin_init() {
    
register_plugin("Xp-Mod v2.1 |NeXoGaminG""1.5""NexoGaminG")
    
xpm_start register_cvar("xpm_start""200");
    
xpm_inc register_cvar("xpm_inc""50");
    
xpm_kill register_cvar("xpm_kill","15")
    
xpm_knife register_cvar("xpm_knife","25")
    
xpm_headshot register_cvar("xpm_headshot","35")
    
xpm_maxlevel register_cvar("xpm_maxlevel","25")
    
xpm_heal_up register_cvar("xpm_heal_up","1")
    
xpm_damage_up register_cvar("xpm_damage_up","1")
    
xpkayit nvault_open("xpmod_kayit")
    
xpm_3drank register_cvar "xpm_3drank""1" )
    
register_clcmd("__xpm_maxlevel","__xpm_maxlevel_devam")
    
register_clcmd("__xpm_kill","__xpm_kill_devam")
    
register_clcmd("__xpm_inc","__xpm_inc_devam")
    
register_clcmd("__xpm_headshot","__xpm_headshot_devam")
    
register_clcmd("__xpm_knife","__xpm_knife_devam")
    
register_clcmd("__xpm_damage_up","__xpm_damage_devam")
    
register_clcmd("__xpm_heal_up","__xpm_heal_devam")
    
register_clcmd("say /xpreset","xpmod_reset")
    
register_clcmd("say /xpkontrol","xpmod_kontrol")
    
register_clcmd("/xpkontrol","xpmod_kontrol")
    
register_event("DeathMsg""event_death""a");
    
register_event("StatusValue""showStatus""be""1=2""2!0")
    
register_event("StatusValue""hideStatus""be""1=1""2=0")
    
RegisterHam(Ham_Spawn,         "player""Fwd_PlayerSpawn_Post",    1)
    
RegisterHam(Ham_TakeDamage,     "player""FwdTakeDamage",         0)
    
hud_show CreateHudSyncObj();
    
hud_info CreateHudSyncObj();
    
aim_goster CreateHudSyncObj()
    
g_iMsgSayText     get_user_msgid("SayText"
}
public 
xpmod_reset(id){
    
seviye[id] = 1
    exp
[id] = 0
    ChatColor
(id,"%s !tleveliniz!y ve !texp (tecrube)!y puaniniz basariyla sifirlanmistir.",tag)
}
public 
plugin_precache() {
    
precache_sound("fvox/beep.wav")
    
precache_sound(level)
}
public 
kaydet(id){
    new 
name[64],key[72], stats[34];
    
get_user_name(idname63);
    
formatex(key71"%s-stats"name);
    
formatex(stats33"%i#%i#"seviye[id], exp[id]);
    
nvault_set(xpkayitkeystats);
}
public 
kontrol(id){
    new 
name[32]
    
get_user_name(id,name,31)
    if(
exp[id] >= g_exp(id)){
        
seviye[id]++    
        
exp[id] = 0
        ChatColor
(0,"%s !t'%s'!y adli oyuncu !g[%d]!y levele ulasti.",tag,name,seviye[id])
        
level_atlama(id)
    }
    else if(
exp[id] < g_exp(id))
    {
        
console_cmd(id,"spk fvox/beep")    
    }
}
public 
yukle(id){
    new 
name[64],key[72], stats[34], stat[3][12];
    
get_user_name(idname63);
    
formatex(key71"%s-stats"name);
    
nvault_get(xpkayitkeystats33);
    
replace_all(stats 33"#"" ")
    
parse(statsstat[0], 11stat[1], 11);
    
seviye[id] = str_to_num(stat[0]);
    
exp[id] = str_to_num(stat[1]);    
    if(
seviye[id] == 0){
        
seviye[id] = 1
    
}
}
public 
client_authorized(id){
    
seviye[id]=1
    exp
[id] = 0
    set_task
(1.0"show_explevel"id__"b")
    
yukle(id)
    
create_rank_entity id )
}
public 
client_disconnect(id){
    
kaydet(id)
    if ( 
gi_PlayerRank id ] > )
        
engfunc EngFunc_RemoveEntitygi_PlayerRank id ] )
    
    
gi_PlayerRank id ] = 0
}
public 
create_rank_entity index )
{    
    
gi_PlayerRank index ] = engfunc EngFunc_CreateNamedEntityengfunc EngFunc_AllocString"info_target" ) )
    
    
set_pev gi_PlayerRank index ], pev_movetypeMOVETYPE_FOLLOW )
    
set_pev gi_PlayerRank index ], pev_aimentindex )
    
set_pev gi_PlayerRank index ], pev_rendermodekRenderNormal )
    
set_pev gi_PlayerRank index ], pev_renderfxkRenderFxGlowShell )
    
set_pev gi_PlayerRank index ], pev_renderamt5.0 )
    
}
public 
event_death(){
    
    
//new attacker = read_data(1);
    
new victim read_data(2);
    new 
attacker get_user_attacker(victim)
    new 
miktar[32] = 
    
if ( is_valid_player attacker ) )
    {
        
check_rank attacker )
    }
    if(
attacker == victim)
    {
        return 
PLUGIN_HANDLED;
    }
    if(
seviye[attacker] >= get_pcvar_num(xpm_maxlevel)){
        
ChatColor(attacker,"%s !tmaximum!y levele ulastiniz.",tag)
        return 
PLUGIN_HANDLED;
    }
    
exp[attacker] += get_pcvar_num(xpm_kill)
    
miktar[attacker] += get_pcvar_num(xpm_kill)
    if(
get_pdata_int(victim75) == HIT_HEAD){
        
exp[attacker] += get_pcvar_num(xpm_headshot)
        
miktar[attacker] += get_pcvar_num(xpm_headshot)
    }
    if(
get_user_weapon(attacker) == CSW_KNIFE){
        
exp[attacker] += get_pcvar_num(xpm_knife)
        
miktar[attacker] += get_pcvar_num(xpm_knife)
    }
    
ChatColor(attacker,"%s !t%d!y exp (tecrube) puani kazandiniz.",tag,miktar[attacker])
    
kontrol(attacker)
    return 
PLUGIN_HANDLED;
}
public 
show_explevel(id){
    if(!
is_user_alive(id))
    return 
PLUGIN_HANDLED;
    new 
ly[33],ey[33],as[33],show[33]
    as[
id] = get_pcvar_num(xpm_start) + (seviye[id] * get_pcvar_num(xpm_inc))
    
ly[id] = seviye[id] * 100 get_pcvar_num(xpm_maxlevel
    
ey[id] = exp[id] * 100 / as[id]
    if(
ly[id] < 6){
    
rutbe[id] = ER
    show 
"ER"
    
}
    else if(
ly[id] < 16 ){
    
rutbe[id] = ONBASI
    show 
"ONBASI"
    
}
    else if(
ly[id] < 31 ){
    
rutbe[id] = CAVUS
    show 
"CAVUS"
    
}
    else if(
ly[id] < 46 ){
    
rutbe[id] = TEGMEN
    show 
"TEGMEN"
    
}
    else if(
ly[id] < 61 ){
    
rutbe[id] = YUZBASI
    show 
"YUZBASI"
    
}
    else if(
ly[id] < 71 ){
    
rutbe[id] = BINBASI
    show 
"BINBASI"
    
}
    else if(
ly[id] < 81 ){
    
rutbe[id] = YARBAY
    show 
"YARBAY"
    
}
    else if(
ly[id] < 91 ){
    
rutbe[id] = ALBAY
    show 
"ALBAY"
    
}
    else if(
ly[id] <= 100){
    
rutbe[id] = GENERAL    
    show 
"GENERAL"
    
}
    
set_hudmessage255000.900.1506.03.00.11.5 );
    
ShowSyncHudMsg(idhud_show,"Exp/Level" );
    
set_hudmessage020500.900.1806.03.00.11.5 );
    
ShowSyncHudMsg(idhud_info"Level: [%d/%d] - (%s%i) ^nExp: [%i/%i] - (%s%i) ^nRutbe: [%s]",seviye[id],get_pcvar_num(xpm_maxlevel),is,ly[id],exp[id],g_exp(id),is,ey[id],show);
    return 
PLUGIN_HANDLED
}
public 
showStatus(id){
    new 
name[32], pid read_data(2)
    
get_user_name(pid,name,31)
    if(!
is_user_bot(id) && is_user_connected(id)) {
        if(
get_user_team(pid) == 1){
            
set_hudmessage(255,25,25, -1.00.5500.013.00.010.01, -1)
            
ShowSyncHudMsg(idaim_goster"%s | Hp: %d | Level: %d",name,get_user_health(pid),seviye[pid])
        }
        else if(
get_user_team(pid) == 2){
            
set_hudmessage(25,25,255, -1.00.5500.013.00.010.01, -1)
            
ShowSyncHudMsg(idaim_goster"%s | Hp: %d | Level: %d",name,get_user_health(pid),seviye[pid])
        }
    }
}
public 
hideStatus(id){
    
ClearSyncHud(idaim_goster)
}
public 
Fwd_PlayerSpawn_Post(player){
    new 
hp
    hp 
seviye[player] * 1
    
if(get_pcvar_num(xpm_heal_up) && is_user_alive(player)){
        
set_user_health(playerget_user_health(player) + hp )
    }
    if ( 
is_valid_player player ) && get_pcvar_num(xpm_3drank))
    {
        
check_rank player )
    }
    else if(!
get_pcvar_num(xpm_3drank))
    {
    if ( 
gi_PlayerRank player ] > )
        
engfunc EngFunc_RemoveEntitygi_PlayerRank player ] )
    
    
gi_PlayerRank [player ] = 0    
    
}
}
public 
FwdTakeDamage(victiminflictorattackerFloat:damagedamage_bits){
    new 
dmg seviyeattacker ] * 1
    
if(get_pcvar_num(xpm_damage_up)){
        
SetHamParamFloatdamage dmg )
        
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED
}
stock level_atlama(id){
    static 
Float:FOrigin3[3// PARLAMA EFEKTI
    
pev(idpev_originFOrigin3)
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYFOrigin30)
    
write_byte(TE_IMPLOSION)
    
engfunc(EngFunc_WriteCoordFOrigin3[0])
    
engfunc(EngFunc_WriteCoordFOrigin3[1])
    
engfunc(EngFunc_WriteCoordFOrigin3[2])
    
write_byte(200)
    
write_byte(100)
    
write_byte(5)  
    message_end
()
    
emit_sound(idCHAN_VOICElevel1.0ATTN_NORM0PITCH_NORM)
    
level_atlama__(id)
}
public 
level_atlama__(id){
    
//new const Invoker
    
static Coord_e:vecOrigin [Coord_e];
    
pev (id,pev_originvecOrigin);

    
message_begin_f (MSG_PVSSVC_TEMPENTITYvecOrigin0);
    
write_byte (TE_DLIGHT);
    
write_coord_f (vecOrigin []);
    
write_coord_f (vecOrigin []);
    
write_coord_f (vecOrigin []);
    
write_byte (35);
    
write_byte (250);
    
write_byte (150);
    
write_byte (15);
    
write_byte (DLIGHT_LIFE);
    
write_byte (DLIGHT_DECAY);
    
message_end();
        
    
return FMRES_HANDLED;
}
public 
xpmod_kontrol(id)
{
    if(
get_user_flags(id) & ADMIN_CVAR)
    {
        static 
Item[64]
        
        
formatex(Itemcharsmax(Item),"\yXpmod | Kontrol Paneli"
        new 
Menu menu_create(Item"takim_menu")
        
        
formatex(Itemcharsmax(Item),"\wxpm_maxlevel \d'%d'",get_pcvar_num(xpm_maxlevel))
        
menu_additem(MenuItem"1")
        
        
formatex(Itemcharsmax(Item),"\wxpm_kill \d'%d'",get_pcvar_num(xpm_kill))
        
menu_additem(MenuItem"2")
        
        
formatex(Itemcharsmax(Item),"\wxpm_inc \d'%d'",get_pcvar_num(xpm_inc))
        
menu_additem(MenuItem"3")
        
        
formatex(Itemcharsmax(Item),"\wxpm_headshot \d'%d'",get_pcvar_num(xpm_headshot))
        
menu_additem(MenuItem"5")
        
        
formatex(Itemcharsmax(Item),"\wxpm_knife \d'%d'",get_pcvar_num(xpm_knife))
        
menu_additem(MenuItem"6")
        
        
formatex(Itemcharsmax(Item),"\wxpm_damage_up \d'%s'",get_pcvar_num(xpm_damage_up) > "Acik" "Kapali")
        
menu_additem(MenuItem"6")
        
        
formatex(Itemcharsmax(Item),"\wxpm_heal_up \d'%s'",get_pcvar_num(xpm_heal_up) > "Acik" "Kapali")
        
menu_additem(MenuItem"7")
        
        
        
        
        
        
menu_setprop(MenuMPROP_EXITMEXIT_ALL)
        
menu_display(idMenu)
    }
    else
    {
        
ChatColor(id,"[%s]!gYetkiniz !yBulunmamaktadir...",tag)
    }
    return 
PLUGIN_HANDLED
}
public 
takim_menu(idmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
Data[6], Name[64]
    new 
AccessCallback
    
new say[300]
    
read_args(saycharsmax(say))
    
    
menu_item_getinfo(menuitemAccessData,5Name63Callback)
    
    new 
Key str_to_num(Data)
    
    switch (
Key)
    {
        case 
1:
        {    
        
client_cmd(id"messagemode __xpm_maxlevel")
        }
        case 
2
        {    
        
client_cmd(id"messagemode __xpm_kill")    
        }
        case 
3:
        {    
        
client_cmd(id"messagemode __xpm_inc")    
        }
        case 
4
        {    
        
client_cmd(id"messagemode __xpm_headshot")    
        }
        case 
5
        {    
        
client_cmd(id"messagemode __xpm_knife")    
        }
        case 
6
        {
        
client_cmd(id"messagemode __xpm_damage_up")
        }
        case 
7
        {    
        
client_cmd(id"messagemode __xpm_heal_up")    
        }
        
    }
    
menu_destroy(menu)    
    return 
PLUGIN_HANDLED
}
public 
__xpm_maxlevel_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_maxlevel %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_kill_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_kill %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_inc_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_inc %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_headshot_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_headshot %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_knife_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_knife %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_heal_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_damage_up %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
__xpm_damage_devam(id){
    new 
say[300]
    
read_args(saycharsmax(say))
    
remove_quotes(say)
    
client_cmd(id,"amx_cvar xpm_heal_up %s",say)
    
console_cmd(id,"/xpkontrol")
}
public 
check_rank index )
{
    new 
PlayerRank get_player_rank index )
    
    
set_pev gi_PlayerRank index ], pev_bodyPlayerRank )
    
    switch ( 
PlayerRank )
    {
        case 
123:
        {
            
set_pev gi_PlayerRank index ], pev_rendercolor, { 255.0255.0255.0 } )
        }
        
        case 
12:
        {
            
set_pev gi_PlayerRank index ], pev_rendercolor, { 255.00.00.0 } )
        }
        
        default:
        {
            
set_pev gi_PlayerRank index ], pev_rendercolor, { 255.0255.00.0 } )
        }
    }
}

stock get_player_rank index )
{
    new 
PlayerFrags rutbeindex ]
    
    switch ( 
PlayerFrags )
    {
        case 
ER:
        {
            return 
1
        
}
        
        case 
ONBASI:
        {
            return 
2
        
}
        
        case 
CAVUS:
        {
            return 
3
        
}
        
        case 
TEGMEN:
        {
            return 
4
        
}
        
        case 
YUZBASI:
        {
            return 
5
        
}
        
        case 
BINBASI:
        {
            return 
6
        
}
        
        case 
YARBAY:
        {
            return 
7
        
}
        
        case 
ALBAY:
        {
            return 
8
        
}
        
        case 
GENERAL:
        {
            return 
9
        
}
        
        default:
        {
            return 
10
        
}
    }
    
    return 
0
}

stock is_valid_player index )
{
    if ( 
is_user_connected index ) && <= index <= 32 )
    {
        return 
true
    
}
    
    return 
false
}
stock ChatColor(const id, const input[], any:...){
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!t""^3"// Team Color
    
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_iMsgSayText_players[i])  
            write_byte
(players[i]);
            
write_string(msg);
            
message_end();
        }
    }
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 

Olmuş Gibi Gözüküyor Teşekkürler Gülümse
#5
Konunuz "Çözülmüş İsteklere" taşınmıştır.

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task
Kayıt Ol