Raised This Month: $51 Target: $400
 12% 

DeathRun XP & Ranks Mod (Version 1.0.2) (Bonus per Lvl / Rank Tags / and more...)


Post New Thread Reply   
 
Thread Tools Display Modes
quilhos
Veteran Member
Join Date: Jun 2010
Old 10-04-2012 , 15:47   Re: DeathRun XP & Level Mod
Reply With Quote #21

Give suggestions , and thanks for the feedback.
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
Nick Haldem
Senior Member
Join Date: Jun 2011
Location: Moldova
Old 10-06-2012 , 17:52   Re: DeathRun XP & Level Mod
Reply With Quote #22

For example, for terrorists, you can achieve glock, 1 lvl - 1 bullet and so on

Also we can make, like Terrorist ticket, you can achieve 1 lvl - 1% that next round you will be terrorist

Same for Usp to Cts.I will think more
__________________
Your server is empty? Visit our webpage http://boost.dyc.lv/ and make it full!!!
Nick Haldem is offline
Send a message via Skype™ to Nick Haldem
quilhos
Veteran Member
Join Date: Jun 2010
Old 10-06-2012 , 19:47   Re: DeathRun XP & Level Mod
Reply With Quote #23

Deathrun weapons I dont wanna add, because of the VIPs menus etc etc. Anyway thanks for the suggestion.
OBS: The plugin work without any bug?
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
FuZZy11
Junior Member
Join Date: Oct 2012
Old 10-09-2012 , 07:34   Re: DeathRun XP & Level Mod
Reply With Quote #24

Tnx Nice Plugin .
FuZZy11 is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 10-12-2012 , 06:58   Re: DeathRun XP & Level Mod (Version 0.0.5) (Bonus for Lvl and more...)
Reply With Quote #25

So sad, it's so easy to make an XP system. And yet you copy mine x)


But seriously... The gravity, it said after the register_cvar that you shouldn't have it over 66.
Make a check for that? ( if(get_pcvar_num(gravityperlvl) > 66) )
__________________
Ex1ne is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 10-12-2012 , 08:48   Re: DeathRun XP & Level Mod (Version 0.0.5) (Bonus for Lvl and more...)
Reply With Quote #26

If you have done a functional xp system, why should I waste mine time doing my self? I credit you for all of your code.

Thanks for the suggestion x) but I must do a check for gavityperlvl > 66 with what? For example this?
PHP Code:
    new GRAVITYCheck 800 - ( get_pcvar_numgravityperlvl ) * Levelid ] );
    
    if(
get_pcvar_num(gravityperlvl) > 66)
    {
        
set_user_gravityidfloat) / 800.0 );
    }
    else
    {
        
set_user_gravityidfloatGRAVITYCheck ) / 800.0 );
    } 
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!

Last edited by quilhos; 10-12-2012 at 08:53.
quilhos is offline
mapper07
Member
Join Date: Oct 2012
Location: NY
Old 10-20-2012 , 21:40   Re: DeathRun XP & Level Mod (Version 0.0.5) (Bonus for Lvl and more...)
Reply With Quote #27

When i run this, everyone has godmode and no one can kill eachother. I pause the plugin and people are able to kill each other. I ran it without any other plugins. Do you have any idea as to why this may be?
mapper07 is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 10-21-2012 , 06:34   Re: DeathRun XP & Level Mod (Version 0.0.5) (Bonus for Lvl and more...)
Reply With Quote #28

I will test it today thanks for your feed back.
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 10-21-2012 , 16:52   Re: DeathRun XP & Level Mod (Version 0.0.6) (Bonus for Lvl and more...)
Reply With Quote #29

Update v0.0.6 [21-10-2012]
Code:
Fix DMG Bug & Messages Bugs
Please check the new version x). (Already tested and working)
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
crossfire123
New Member
Join Date: Oct 2012
Old 10-23-2012 , 13:58   Re: DeathRun XP & Level Mod (Version 0.0.6) (Bonus for Lvl and more...)
Reply With Quote #30

I have made any customizations and now I get an error in the console:
[IMG]http://**************/a/img109/4144/errorlog.png[/IMG]
And when i compile,this:
[IMG]http://**************/a/img191/8553/errorcompiled.png[/IMG]
And this is the edited plugin:
Code:
#include <amxmodx>
#include <amxmisc>
#include <nvault>  
#include <colorchat>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>

new Level[33], eXP[33]
new KillXp, HsXp, HeXp, KnifeXp
new gVault

new const szPrefix[] = "^4[DeathRun XP]"

#define MaxLevels 20
#define IsPlayer(%1) ( 1 <= %1 <=  g_iMaxPlayers )

new const Levels[MaxLevels] = 
{
0,
25,
50,
100,
150,
200,
300,
400,
500,
750,
1000,
1250,
1500,
1750,
2000,
2500,
3000,
3500,
4000,
5000
}

new const Prefix[MaxLevels][] =
{
"Newbie",
"1st Class Jumper",
"Freestyler",
"Incredible",
"Unstoppable",
"Perfect",
"Jarring",
"Technique",
"Quick",
"B'Hopper",
"Jumper",
"Alien Jumper",
"Super Bhopper",
"B'Hop Master",
"Lighting",
"Jump Master",
"Speedrunner",
"Speed Master",
"God Like",
"Pro DeathRun"
}

new healthperlevel, armorperlevel

new g_iMaxPlayers

public plugin_init() 
{
register_plugin("Deathrun XP", "xx.xx", "Freestyle")

register_event("DeathMsg", "EventDeathMsg", "a")

register_message(get_user_msgid("SayText"),"handleSayText");

RegisterHam ( Ham_Spawn, "player", "Ham_CheckOthers_Bonus", 1);

g_iMaxPlayers = get_maxplayers( );

register_clcmd ( "say /xp", "ShowPlayerXP")
register_clcmd ( "say_team /xp", "ShowPlayerXP")
register_clcmd ( "say xp", "ShowPlayerXP")
register_clcmd ( "say_team xp", "ShowPlayerXP")

KillXp    = register_cvar("xm_xp_pr_kill", "5")
HsXp    = register_cvar("xm_xp_pr_hs", "10")
HeXp    = register_cvar("xm_xp_pr_nade", "15")
KnifeXp    = register_cvar("xm_xp_pr_knife", "20")

register_concmd ( "give_xp", "CmdAddXP", ADMIN_RCON, "<nick, #userid, authid | @all> <xp>" )
register_concmd ( "remove_xp", "CmdRemoveXP", ADMIN_RCON, "<nick, #userid, authid | @all> <xp>" )

healthperlevel    = register_cvar("health_per_lvl", "5")
armorperlevel    = register_cvar("armor_per_lvl", "5") 
}

public plugin_cfg( )
{    
gVault = nvault_open( "DEATHRUN_XP" )

if ( gVault == INVALID_HANDLE )
set_fail_state( "Error opening nVault" );
}

public ShowPlayerXP(id)
{
ColorChat(id, GREY, "%s ^1You have ^4%i^1 XP and your Level is ^4%s^3!", szPrefix, eXP[id], Prefix[Level[id]])
}

public Ham_CheckOthers_Bonus(id)
{
if( !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_T )
return HAM_IGNORED;

new HPCheck = ( get_user_health(id) + get_pcvar_num(healthperlevel) * Level[ id ] );
set_user_health( id, HPCheck );

new APCheck = ( get_user_armor(id) + get_pcvar_num(armorperlevel) * Level[ id ] );
set_user_armor( id, APCheck );
        
return HAM_IGNORED;
}

public LvL_20_PlayerJoin(id)
{
new name[32]
get_user_name(id, name, sizeof(name) -1)

ColorChat(0, GREY, "%s ^3Respected Player : ^4%s^3 has joined with ^1%i^4 XP^1!", szPrefix, name, eXP[id])
}

public LvL_20_PlayerRemove(id)
{
new name[32]
get_user_name(id, name, sizeof(name) -1)

ColorChat(0, GREY, "%s ^3Respected Player : ^4%s^3 has left with ^1%i^4 XP^1!", szPrefix, name, eXP[id])
}

public plugin_end( )
nvault_close( gVault )
    
public client_putinserver(id)
{
LoadData(id)
set_task( 3.0, "ShowHud", id, .flags = "b" );

if(Level[id] == 20)
{
set_task(5.0, "LvL_20_PlayerJoin", id)
}
}

public client_disconnect(id)
{
SaveData(id)

if(Level[id] == 20)
{
set_task(1.0, "LvL_20_PlayerRemove", id)
}
}

public EventDeathMsg( )
{
new iKiller = read_data(1)

new iVictim = read_data(2)

new Headshot = read_data(3)

new weapon[32]
read_data(4, weapon, sizeof(weapon) -1)
if(iKiller == iVictim)
{
return PLUGIN_HANDLED
}
new name[32]

get_user_name(iVictim, name, sizeof(name) -1)


eXP[iKiller] += get_pcvar_num(KillXp)
if(Headshot)
{
eXP[iKiller] += get_pcvar_num(HsXp)
ColorChat(iKiller, GREY, "%s ^3You got an extra ^4%i^3 XP^1 for killing ^4%s^3 with a ^4HeadShot^1!", szPrefix, get_pcvar_num(HsXp), name)
}
else
{
if(equali(weapon, "knife"))
{
eXP[iKiller] += get_pcvar_num(KnifeXp)
ColorChat(iKiller, GREY, "%s ^3You got an extra ^4%i^3 XP^1 for killing ^4%s^3 with your ^4Knife^1!", szPrefix, get_pcvar_num(KnifeXp), name)
}
if(equali(weapon, "grenade"))
{
eXP[iKiller] += get_pcvar_num(HeXp)
ColorChat(iKiller, GREY, "%s ^3You got an extra ^4%i^3 XP^1 for killing ^4%s^3 with a ^4Grenade^1!", szPrefix, get_pcvar_num(HeXp), name)
}
}
CheckLevel(iKiller)
SaveData(iKiller)
ShowHud(iKiller)

return PLUGIN_HANDLED
}

public CheckLevel(id)
{
if(Level[id] < MaxLevels-1)
{
while(eXP[id] >= Levels[Level[id]])
{
Level[id] += 1 
ColorChat(id, GREY, "%s ^1Congratulations, you've leveled up! You are now level : ^4%i^1.", szPrefix, Level[id])
}
} 
}

public ShowHud(id)
{
set_hudmessage(255, 0, 0, 0.01, 0.75, 0, 5.0, 5.0, 5.0)
show_hudmessage(id, "[Level : %s]^n[XP : %i]^n", Prefix[Level[id]], eXP[id])
}

public SaveData(id) 
{ 
new AuthID[35]
get_user_authid(id,AuthID,34) 
new vaultkey[64],vaultdata[256] 

format(vaultkey,63,"%s-Mod",AuthID) 
format(vaultdata,255,"%i#%i#",eXP[id],Level[id]) 

nvault_set(gVault,vaultkey,vaultdata) 

return PLUGIN_CONTINUE 
} 
public LoadData(id) 
{ 
new AuthID[35]
get_user_authid(id,AuthID,34) 
new vaultkey[64],vaultdata[256] 

format(vaultkey,63,"%s-Mod",AuthID) 
format(vaultdata,255,"%i#%i#",eXP[id],Level[id]) 

nvault_get(gVault,vaultkey,vaultdata,255) 

replace_all(vaultdata, 255, "#", " ") 

new playerxp[32], playerlevel[32] 

parse(vaultdata, playerxp, 31, playerlevel, 31) 

eXP[id] = str_to_num(playerxp) 

Level[id] = str_to_num(playerlevel) 

return PLUGIN_CONTINUE 
} 

public CmdAddXP ( iPlayer, level, cid )
{
if( !cmd_access(iPlayer, level, cid, 3) ) return PLUGIN_HANDLED;

new arg [ 32 ]
read_argv ( 1, arg, charsmax ( arg ) )

new AddXP [ 32 ]
read_argv ( 2, AddXP, charsmax ( AddXP ) )

new XPtoGive = str_to_num ( AddXP )

new iTarget
new AdminName [ 32 ]
new TargetName [ 32 ]
get_user_name ( iPlayer, AdminName, charsmax ( AdminName ) )

if ( equali ( arg, "@all" ) )
{
new iPlayer [ 32 ], iNum, All
get_players ( iPlayer, iNum )

for ( new i; i < iNum; i++ )
{
All = iPlayer [ i ]
       
eXP[ All ] += XPtoGive
}

CheckLevel( All )

ColorChat ( 0, GREY, "%s ^1%s^3 give^1 %i^3 XP to all players^1!", szPrefix, AdminName, XPtoGive )
}

else
{
iTarget = cmd_target( iPlayer, arg, 31 )
get_user_name ( iTarget, TargetName, charsmax ( TargetName ) )

if( !iTarget )
return PLUGIN_HANDLED

eXP[ iTarget ] += XPtoGive

CheckLevel( iTarget )

ColorChat ( 0, GREY, "%s ^1%s^3 give^1 %i^3 XP to^1 %s^3.", szPrefix, AdminName, XPtoGive, TargetName )
}
 
return PLUGIN_HANDLED
}
 
public CmdRemoveXP ( iPlayer, level, cid )
{
if( !cmd_access(iPlayer, level, cid, 3) ) return PLUGIN_HANDLED;

new arg [ 32 ]
read_argv ( 1, arg, charsmax ( arg ) )

new RemoveXP [ 32 ]
read_argv ( 2, RemoveXP, charsmax ( RemoveXP ) )

new XPtoRemove = str_to_num ( RemoveXP )

new iTarget
new AdminName [ 32 ]
new TargetName [ 32 ]
get_user_name ( iPlayer, AdminName, charsmax ( AdminName ) )

if ( equali ( arg, "@all" ) )
{
new iPlayer [ 32 ], iNum, All
get_players ( iPlayer, iNum )
for ( new i; i < iNum; i++ )
{
All = iPlayer [ i ]
       
eXP[ All ] -= XPtoRemove
}

ColorChat ( 0, GREY, "%s ^1%s^3 remove^1 %i^3 XP from all players^1!", szPrefix, AdminName, XPtoRemove )
}
    
else
{
iTarget = cmd_target( iPlayer, arg, 31 )
get_user_name ( iTarget, TargetName, charsmax ( TargetName ) )

if( !iTarget )
return PLUGIN_HANDLED

eXP[ iTarget ] -= XPtoRemove
   
ColorChat ( 0, GREY, "%s ^1%s^3 remove^1 %i^3 XP from ^1 %s^3.", szPrefix, AdminName, XPtoRemove, TargetName )
}

return PLUGIN_HANDLED
}

public handleSayText()
{
new id = get_msg_arg_int(1)

new szChannel[40]
get_msg_arg_string(2, szChannel, charsmax( szChannel ) )
if( equal(szChannel, "#Cstrike_Chat", 13) )
{
if( equal(szChannel, "#Cstrike_Chat_All") )
{
format(szChannel, charsmax(szChannel), "^4[%s] ^3%%s1 ^1:  %%s2", Prefix[Levels[id]])
}

else
{
format(szChannel, charsmax(szChannel), "^4[%s] %s", Prefix[Levels[id]], szChannel)
}

set_msg_arg_string(2, szChannel)
}
}
I hope you will help me to fix it,becouse it's very omportant to me,tnx And if u can,pls make the hud with dhud,cuz it's more beautiful with dhud ;)

Last edited by crossfire123; 10-23-2012 at 14:00.
crossfire123 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode