Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
PROBLEMA PLUGIN
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
911
human2018
[Mentally Stable]
Status: Offline
(since 21-10-2018 18:39)
Joined: 31 Dec 2017
Posts: 91
,
Topics: 37
Location:
Romania
Reputation:
13.6
Votes
: 5
Posted: 22-02-2018, 13:22:19
| Translate post to:
... (
Click for more languages
)
»Nume*: KNIFE SKIN-LEVEL
»Descriere problema*: CAND IMI PICA SERVER_UL MI SE RESTARTEAZA XP -ul PLAYERILOR , daca stie cine sa -l modifece astfel incat sa ramana salvat de fiecare data cand pica serverul sau ceva de genul !
»Poze/Sma:
sma:
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <vault>
#include <hamsandwich>
#include <fvault>
#pragma tabsize 0
#define is_valid_player(%1) (1 <= %1 <= 32)
new knife_model[33];
new const g_VAULTNAME[] = "Knife + Level Xp";
new const VERSION[] = "2.2"
new const AUTHOR[] = "necunoscut"
new iLevel[33];
new iXp[33];
new knife_on;
new MaxLevel;
new StartedLevel;
new cvar_KillXp;
new cvar_HsXp;
new cvar_KnifeXp;
new Forward_spawn;
new Forward_levelup;
new ForwardReturn;
new const g_KnifeNames[][32] =
{
"Normal Knife",
"Alien Knife",
"Ellium Dagger",
"Dark Dagger",
"Transparent Knife",
"Genuine Dagger",
"Hunt Blade",
"Shadow Blade",
"Slaughterer Axe",
"Golden Katana",
"Assasin's Blade",
"Lightsaber",
"Bloody Wolverine Claws",
"Proton Axe",
"Darth Maul",
"Raptor",
"Dragon Sword",
"Kunai",
"Rod of Asclepius",
"Dragon Knife",
"Griff Knife",
"Fade Knife",
"Autotronic Knife",
"Buster Sword",
"Dual Nataknife",
"Ancient Dagger",
"Marine Knife",
"Katana Fade",
"Executor Knife",
"Balrog Axe",
"Wolverine Claws 2",
"Huntsman Knife",
"Karambit",
"Yellow Knife",
"Marbale Knife",
"Neon Knife",
"Fire Knife",
"M9 Bayonet Blood"
};
new const g_KnifevModels[][256] =
{
"models/v_knife.mdl",
"models/v_knife_alien.mdl",
"models/v_knife_ellium.mdl",
"models/v_knife_dark.mdl",
"models/v_knife_transparent.mdl",
"models/v_knife_genuine.mdl",
"models/v_knife_hunt.mdl",
"models/v_knife_shadow.mdl",
"models/v_knife_slaughterer.mdl",
"models/v_knife_katana.mdl",
"models/v_knife_assasins.mdl",
"models/v_knife_lightsaber.mdl",
"models/v_knife_wolverine.mdl",
"models/v_knife_proton.mdl",
"models/v_knife_darth.mdl",
"models/v_knife_raptor.mdl",
"models/v_knife_dragon.mdl",
"models/v_knife_kunai.mdl",
"models/v_knife_rod.mdl",
"models/v_knife_dragon2.mdl",
"models/v_knife_griff.mdl",
"models/v_knife_fade.mdl",
"models/v_knife_autotronic.mdl",
"models/v_knife_buster.mdl",
"models/v_knife_dual.mdl",
"models/v_knife_ancient.mdl",
"models/v_knife_marine.mdl",
"models/v_knife_katana2.mdl",
"models/v_knife_executor.mdl",
"models/v_knife_balrog.mdl",
"models/v_knife_wolverine2.mdl",
"models/v_knife_huntsman.mdl",
"models/v_knife_karambit.mdl",
"models/v_knife_yellow.mdl",
"models/v_knife_marbale.mdl",
"models/v_knife_neon.mdl",
"models/v_knife_fire.mdl",
"models/v_knife_blood.mdl"
}
native register_maxlevels( maxlevel = 999, started_xp_level = 200 );
native get_user_level( index );
native get_user_xp( index );
public plugin_init() {
register_plugin(g_VAULTNAME, VERSION, AUTHOR);
register_cvar("knife_skins", VERSION, FCVAR_SERVER); // Find Servers on Game-Monitor
set_cvar_string("knife_skins", VERSION); // Find Servers on Game-Monitor
// register max levels 30 is the top level, 100 is the started level xp.
register_maxlevels( 999, 200 );
//Admin commands
register_concmd("knife_givexp" ,"givexp",ADMIN_RCON,"Add xp to a player")
register_concmd("knife_takexp", "takexp",ADMIN_RCON,"Remove xp from a player")
//Clcmd's
knife_on = register_cvar( "knife_skins", "1" );
register_clcmd("say","HandleSay");
register_clcmd("say_team","HandleSay")
register_clcmd("say /knife", "KnifeSkinsMenu");
register_clcmd("say /level", "PlayerLevelsMenu");
//Event's
register_event("CurWeapon","CurWeapon","be","1=1");
register_event( "DeathMsg", "EventDeathMsg", "a" );
//Cvar's
cvar_KillXp = register_cvar( "kill_xp", "30" );
cvar_HsXp = register_cvar( "hs_xp", "5" );
cvar_KnifeXp = register_cvar( "knife_xp", "10" );
//Forward's
Forward_levelup = CreateMultiForward( "forward_client_levelup", ET_IGNORE, FP_CELL, FP_CELL, FP_CELL );
Forward_spawn = CreateMultiForward( "forward_client_spawn", ET_IGNORE, FP_CELL , FP_CELL, FP_CELL );
set_task(15.0, "Knifemessage", 0, _, _, "b")
set_task(35.0, "Levelmessage", 0, _, _, "b")
}
public plugin_precache() {
precache_model("models/v_knife_alien.mdl")
precache_model("models/v_knife_ellium.mdl")
precache_model("models/v_knife_dark.mdl")
precache_model("models/v_knife_transparent.mdl")
precache_model("models/v_knife_genuine.mdl")
precache_model("models/v_knife_hunt.mdl")
precache_model("models/v_knife_shadow.mdl")
precache_model("models/v_knife_slaughterer.mdl")
precache_model("models/v_knife_katana.mdl")
precache_model("models/v_knife_assasins.mdl")
precache_model("models/v_knife_lightsaber.mdl")
precache_model("models/v_knife_wolverine.mdl")
precache_model("models/v_knife_proton.mdl")
precache_model("models/v_knife_darth.mdl")
precache_model("models/v_knife_raptor.mdl")
precache_model("models/v_knife_dragon.mdl")
precache_model("models/v_knife_kunai.mdl")
precache_model("models/v_knife_rod.mdl")
precache_model("models/v_knife_dragon2.mdl")
precache_model("models/v_knife_griff.mdl")
precache_model("models/v_knife_fade.mdl")
precache_model("models/v_knife_autotronic.mdl")
precache_model("models/v_knife_buster.mdl")
precache_model("models/v_knife_dual.mdl")
precache_model("models/v_knife_ancient.mdl")
precache_model("models/v_knife_marine.mdl")
precache_model("models/v_knife_katana2.mdl")
precache_model("models/v_knife_executor.mdl")
precache_model("models/v_knife_balrog.mdl")
precache_model("models/v_knife_wolverine2.mdl")
precache_model("models/v_knife_huntsman.mdl")
precache_model("models/v_knife_karambit.mdl")
precache_model("models/v_knife_yellow.mdl")
precache_model("models/v_knife_marbale.mdl")
precache_model("models/v_knife_neon.mdl")
precache_model("models/v_knife_fire.mdl")
precache_model("models/v_knife_blood.mdl")
}
public plugin_natives( )
{
//Native's
register_library( "Knife-Skins" );
register_native( "register_maxlevels", "_register_maxlevels" );
register_native( "get_user_level", "_get_user_level" );
register_native( "set_user_level", "_set_user_level" );
register_native( "get_user_xp", "_get_user_xp" );
register_native( "set_user_xp", "_set_user_xp" );
}
public _register_maxlevels( plugin, params )
{
if( MaxLevel != 0 && StartedLevel != 0 )
{
return;
}
else
{
MaxLevel = get_param( 1 );
StartedLevel = get_param( 2 );
}
}
public _get_user_level( plugin, params )
{
return iLevel[ get_param( 1 ) ];
}
public _set_user_level( plugin, params )
{
iLevel[ get_param( 1 ) ] = max( get_param( 2 ), MaxLevel );
FlsahLevelUp( get_param( 1 ) );
SaveData( get_param( 1 ) );
LoadData( get_param( 1 ) );
}
public _get_user_xp( plugin, params )
{
return iXp[ get_param( 1 ) ];
}
public _set_user_xp( plugin, params )
{
iXp[ get_param( 1 ) ] = get_param( 2 );
CheckLevel( get_param( 1 ) );
SaveData( get_param( 1 ) );
LoadData( get_param( 1 ) );
}
public CheckLevel( id )
{
if( iLevel[id] == MaxLevel )
{
return;
}
else
{
new level = iLevel[id] > 0 ? iLevel[id] : 1;
new xp = level * StartedLevel;
if( iLevel[id] > 0 )
{
xp += ( xp * 4 / 2 );
}
while( iXp[id] >= xp )
{
iLevel[id]++;
ColorChat(id,"^4Congratulations!^1 You'r have level up! You'r new^4 LEVEL^1 is: ^3%i^1.", iLevel[id]);
ColorChat(0,"^3%s^1 has level up to^4 LEVEL^3 %i^1!",get_player_name(id), iLevel[id]);
FlsahLevelUp(id);
ExecuteForward( Forward_levelup, ForwardReturn, id, iLevel[id], iXp[id] );
SaveData( id );
CheckLevel( id );
break;
}
}
}
public FlsahLevelUp( id )
{
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0, 0, 0}, id );
write_short( 1 << 10 );
write_short( 1 << 10 );
write_short( 0 );
write_byte( 0 );
write_byte( 255 );
write_byte( 215 );
write_byte( 100 );
message_end( );
}
public HandleSay(id){
if (get_pcvar_num(knife_on) == 0)
{
ColorChat(id, "The mod has been disabale.");
return PLUGIN_HANDLED;
}
new iMsg[200], iArgs[4][60];
new level = iLevel[id] > 0 ? iLevel[id] : 1;
new xp = level * StartedLevel;
if( iLevel[id] > 0 )
{
xp += ( xp * 4 / 2 );
}
read_argv(1,iMsg ,sizeof iMsg - 1);
parse(iMsg,iArgs[0],charsmax(iArgs[]),iArgs[1],charsmax(iArgs[]),iArgs[2],charsmax(iArgs[]),iArgs[3],charsmax(iArgs[]));
if (equali(iArgs[0],"/level") || equali(iArgs[0],"/lvl") || equali(iArgs[0],"/xp"))
{
new player = cmd_target(id,iArgs[1],CMDTARGET_NO_BOTS);
if (!player)
{
ColorChat( id, "Your^4 LEVEL^1 is:^3 %i^4 |^1 Your^4 XP^1 is:^3 %i^1/^3%i^1.", iLevel[id], iXp[id], xp );
}
}
return 0;
}
public EventDeathMsg(id)
{
if (get_pcvar_num(knife_on) == 0)
return PLUGIN_HANDLED;
new killer = read_data( 1 );
new victim = read_data( 2 );
if( killer == victim || ! is_user_connected( killer ) || ! is_user_connected( victim ) )
{
return PLUGIN_HANDLED;
//return;
}
new XpAmount = get_pcvar_num( cvar_KillXp );
if( read_data( 3 ) )
{
XpAmount += get_pcvar_num( cvar_HsXp );
}
static sWeapon[ 26 ];
read_data( 4, sWeapon, sizeof( sWeapon ) - 1 );
if( equal( sWeapon, "knife" ) )
{
XpAmount += get_pcvar_num( cvar_KnifeXp );
}
iXp[ killer ] += XpAmount;
CheckLevel( killer );
SaveData( killer );
ColorChat( killer, "You have gained^3 %i^1 XP.", XpAmount );
return PLUGIN_HANDLED;
}
public FwdPlayerSpawn( id )
{
ExecuteForward( Forward_spawn, ForwardReturn, id, iLevel[id], iXp[id] );
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if( get_pcvar_num( knife_on ) == 0 )
return HAM_IGNORED;
if( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_KNIFE )
{
SetHamParamFloat(4, damage + knife_model[attacker]);
return HAM_HANDLED;
}
return HAM_IGNORED;
}
public KnifeSkinsMenu(id) {
if (get_pcvar_num(knife_on) == 0)
{
ColorChat(id, "The mod has been disabale.");
return PLUGIN_HANDLED;
}
new szItem[256], szAlien[50], szEllium[50], szDark[50], szTransparent[50], szGenuine[50], szHunt[50], szShadow[50], szSlaughterer[50], szKatana[50], szAssasins[50],
szLightsaber[50], szWolverine[50], szProton[50], szDarth[50], szRaptor[50], szDragon[50], szKunai[50], szRod[50], szDragon2[50], szGriff[50], szFade[50], szAutotronic[50], szBuster[50], szDual[50], szAncient[50], szMarine[50], szKatana2[50], szExecutor[50], szBalrog[50], szWolverine2[50], szHuntsman[50], szKarambit[50], szYellow[50], szMarbale[50], szNeon[50], szFire[50], szBlood[50];
new level = iLevel[id] > 0 ? iLevel[id] : 1;
new xp = level * StartedLevel;
if( iLevel[id] > 0 )
{
xp += ( xp * 4 / 2 );
}
formatex(szItem, charsmax(szItem), "\w[ \r%s \w] \yKnife Skins Menu \rv%s^n\yYour Level: \r%d \w- \yYour XP: \r%d\w/\r%d\w.^n\yPage:\r", g_VAULTNAME, VERSION,iLevel[id],iXp[id], xp);
formatex(szAlien, charsmax(szAlien),"%s", iLevel[id] >= 10 ? "\wAlien Knife [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 10 REQUIRE\d]");
formatex(szEllium, charsmax(szEllium),"%s", iLevel[id] >= 20 ? "\wEllium Knife [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 20 REQUIRE\d]");
formatex(szDark, charsmax(szDark),"%s", iLevel[id] >= 30 ? "\wDark Dagger [\yUNLOCKED\w]" : "\d???? ?????? [\rLEVEL 30 REQUIRE\d]");
formatex(szTransparent, charsmax(szTransparent),"%s", iLevel[id] >= 40 ? "\wTransparent Knife [\yUNLOCKED\w]" : "\d??????????? ????? [\rLEVEL 40 REQUIRE\d]");
formatex(szGenuine, charsmax(szGenuine),"%s", iLevel[id] >= 50 ? "\wGenuine Dagger [\yUNLOCKED\w]" : "\d??????? ?????? [\rLEVEL 50 REQUIRE\d]");
formatex(szHunt, charsmax(szHunt),"%s", iLevel[id] >= 60 ? "\wHunt Blade [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 60 REQUIRE\d]");
formatex(szShadow, charsmax(szShadow),"%s", iLevel[id] >= 70 ? "\wShadow Blade [\yUNLOCKED\w]" : "\d?????? ????? [\rLEVEL 70 REQUIRE\d]");
formatex(szSlaughterer, charsmax(szSlaughterer),"%s", iLevel[id] >= 80 ? "\wSlaughterer Axe [\yUNLOCKED\w]" : "\d??????????? ??? [\rLEVEL 80 REQUIRE\d]");
formatex(szKatana, charsmax(szKatana),"%s", iLevel[id] >= 90 ? "\wGolden Katana [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 90 REQUIRE\d]");
formatex(szAssasins, charsmax(szAssasins),"%s", iLevel[id] >= 100 ? "\wAssasin's Blade [\yUNLOCKED\w]" : "\d???????? ????? [\rLEVEL 100 REQUIRE\d]");
formatex(szLightsaber, charsmax(szLightsaber),"%s", iLevel[id] >= 110 ? "\wLightsaber [\yUNLOCKED\w]" : "\d?????????? [\rLEVEL 110 REQUIRE\d]");
formatex(szWolverine, charsmax(szWolverine),"%s", iLevel[id] >= 120 ? "\wBloody Wolverine Claws [\yUNLOCKED\w]" : "\d?????? ????????? ????? [\rLEVEL 120 REQUIRE\d]");
formatex(szProton, charsmax(szProton),"%s", iLevel[id] >= 130 ? "\wProton Axe [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 130 REQUIRE\d]");
formatex(szDarth, charsmax(szDarth),"%s", iLevel[id] >= 140 ? "\wDarth Maul [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 140 REQUIRE\d]");
formatex(szRaptor, charsmax(szRaptor),"%s", iLevel[id] >= 150 ? "\wRaptor [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 150 REQUIRE\d]");
formatex(szDragon, charsmax(szDragon),"%s", iLevel[id] >= 160 ? "\wDragon Sword [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 160 REQUIRE\d]");
formatex(szKunai, charsmax(szKunai),"%s", iLevel[id] >= 170 ? "\wKunai [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 170 REQUIRE\d]");
formatex(szRod, charsmax(szRod),"%s", iLevel[id] >= 180 ? "\wRod of Asclepius [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 180 REQUIRE\d]");
formatex(szDragon2, charsmax(szDragon2),"%s", iLevel[id] >= 190 ? "\wDragon Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 190 REQUIRE\d]");
formatex(szGriff, charsmax(szGriff),"%s", iLevel[id] >= 200 ? "\wGriff Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 200 REQUIRE\d]");
formatex(szFade, charsmax(szFade),"%s", iLevel[id] >= 210 ? "\wFade Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 210 REQUIRE\d]");
formatex(szAutotronic, charsmax(szAutotronic),"%s", iLevel[id] >= 220 ? "\wAutotronic Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 220 REQUIRE\d]");
formatex(szBuster, charsmax(szBuster),"%s", iLevel[id] >= 230 ? "\wBuster Sword [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 230 REQUIRE\d]");
formatex(szDual, charsmax(szDual),"%s", iLevel[id] >= 240 ? "\wDual Nataknife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 240 REQUIRE\d]");
formatex(szAncient, charsmax(szAncient),"%s", iLevel[id] >= 250 ? "\wAncient Dagger [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 250 REQUIRE\d]");
formatex(szMarine, charsmax(szMarine),"%s", iLevel[id] >= 260 ? "\wMarine Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 260 REQUIRE\d]");
formatex(szKatana2, charsmax(szKatana2),"%s", iLevel[id] >= 270 ? "\wKatana Fade [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 270 REQUIRE\d]");
formatex(szExecutor, charsmax(szExecutor),"%s", iLevel[id] >= 280 ? "\wExecutor Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 280 REQUIRE\d]");
formatex(szBalrog, charsmax(szBalrog),"%s", iLevel[id] >= 290 ? "\wBalrog Axe [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 290 REQUIRE\d]");
formatex(szWolverine2, charsmax(szWolverine2),"%s", iLevel[id] >= 300 ? "\wWolverine Claws 2 [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 300 REQUIRE\d]");
formatex(szHuntsman, charsmax(szHuntsman),"%s", iLevel[id] >= 400 ? "\wHuntsman Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 400 REQUIRE\d]");
formatex(szKarambit , charsmax(szKarambit),"%s", iLevel[id] >= 500 ? "\wKarambit [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 500 REQUIRE\d]");
formatex(szYellow , charsmax(szYellow),"%s", iLevel[id] >= 600 ? "\wYellow Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 600 REQUIRE\d]");
formatex(szMarbale , charsmax(szMarbale),"%s", iLevel[id] >= 700 ? "\wMarbale Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 700 REQUIRE\d]");
formatex(szNeon , charsmax(szNeon),"%s", iLevel[id] >= 800 ? "\wNeon Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 800 REQUIRE\d]");
formatex(szFire , charsmax(szFire),"%s", iLevel[id] >= 900 ? "\wFire Knife [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 900 REQUIRE\d]");
formatex(szBlood , charsmax(szBlood),"%s", iLevel[id] >= 999 ? "\wM9 Bayonet Blood [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 999 REQUIRE\d]");
new menu = menu_create( szItem, "KnifeSkinsMenu_Handler" );
menu_additem(menu, "\wNormal Knife [\yUNLOCKED\w]", "", 0 );
menu_additem(menu, szAlien, "", iLevel[id] >= 10 ? 0 : 1);
menu_additem(menu, szEllium, "", iLevel[id] >= 20 ? 0 : 1);
menu_additem(menu, szDark, "", iLevel[id] >= 30 ? 0 : 1);
menu_additem(menu, szTransparent, "", iLevel[id] >= 40 ? 0 : 1);
menu_additem(menu, szGenuine, "", iLevel[id] >= 50 ? 0 : 1);
menu_additem(menu, szHunt, "", iLevel[id] >= 60 ? 0 : 1);
menu_additem(menu, szShadow, "", iLevel[id] >= 70 ? 0 : 1);
menu_additem(menu, szSlaughterer, "", iLevel[id] >= 80 ? 0 : 1);
menu_additem(menu, szKatana, "", iLevel[id] >= 90 ? 0 : 1);
menu_additem(menu, szAssasins, "", iLevel[id] >= 100 ? 0 : 1);
menu_additem(menu, szLightsaber, "", iLevel[id] >= 110 ? 0 : 1);
menu_additem(menu, szWolverine, "", iLevel[id] >= 120 ? 0 : 1);
menu_additem(menu, szProton, "", iLevel[id] >= 130 ? 0 : 1);
menu_additem(menu, szDarth, "", iLevel[id] >= 140 ? 0 : 1);
menu_additem(menu, szRaptor, "", iLevel[id] >= 150 ? 0 : 1);
menu_additem(menu, szDragon, "", iLevel[id] >= 160 ? 0 : 1);
menu_additem(menu, szKunai, "", iLevel[id] >= 170 ? 0 : 1);
menu_additem(menu, szRod, "", iLevel[id] >= 180 ? 0 : 1);
menu_additem(menu, szDragon2, "", iLevel[id] >= 190 ? 0 : 1);
menu_additem(menu, szGriff, "", iLevel[id] >= 200 ? 0 : 1);
menu_additem(menu, szFade, "", iLevel[id] >= 210 ? 0 : 1);
menu_additem(menu, szAutotronic, "", iLevel[id] >= 220 ? 0 : 1);
menu_additem(menu, szBuster, "", iLevel[id] >= 230 ? 0 : 1);
menu_additem(menu, szDual , "", iLevel[id] >= 240 ? 0 : 1);
menu_additem(menu, szAncient , "", iLevel[id] >= 250 ? 0 : 1);
menu_additem(menu, szMarine , "", iLevel[id] >= 260 ? 0 : 1);
menu_additem(menu, szKatana2 , "", iLevel[id] >= 270 ? 0 : 1);
menu_additem(menu, szExecutor , "", iLevel[id] >= 280 ? 0 : 1);
menu_additem(menu, szBalrog , "", iLevel[id] >= 290 ? 0 : 1);
menu_additem(menu, szWolverine2 , "", iLevel[id] >= 300 ? 0 : 1);
menu_additem(menu, szHuntsman , "", iLevel[id] >= 400 ? 0 : 1);
menu_additem(menu, szKarambit , "", iLevel[id] >= 500 ? 0 : 1);
menu_additem(menu, szYellow , "", iLevel[id] >= 600 ? 0 : 1);
menu_additem(menu, szMarbale , "", iLevel[id] >= 700 ? 0 : 1);
menu_additem(menu, szNeon , "", iLevel[id] >= 800 ? 0 : 1);
menu_additem(menu, szFire , "", iLevel[id] >= 900 ? 0 : 1);
menu_additem(menu, szBlood , "", iLevel[id] >= 999 ? 0 : 1);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL );
menu_display(id, menu, 0 );
return PLUGIN_HANDLED;
}
public KnifeSkinsMenu_Handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
SetKnife(id, item);
ColorChat(id, "The knife you chose is: ^4%s^1.", g_KnifeNames[item]);
SaveData(id);
return PLUGIN_HANDLED;
}
public SetKnife(id, item) {
knife_model[id] = item
new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo)
if ( Weapon != CSW_KNIFE )
return PLUGIN_HANDLED
new vModel[56],pModel[56]
if (get_pcvar_num(knife_on) == 0)
{
format(vModel,55,"models/v_knife.mdl")
return PLUGIN_HANDLED;
}
format(vModel,55, g_KnifevModels[item])
format(pModel,55,"models/p_knife.mdl")
entity_set_string(id, EV_SZ_viewmodel, vModel)
entity_set_string(id, EV_SZ_weaponmodel, pModel)
return PLUGIN_HANDLED;
}
public PlayerLevelsMenu(id)
{
if (get_pcvar_num(knife_on) == 0)
{
ColorChat(id, "The mod has been disabale.");
return PLUGIN_HANDLED;
}
new some[256], menu;
static players[32],szTemp[10],pnum;
get_players(players,pnum,"ch");
formatex(some,255,"\w[ \r%s \w] \yPlayer's Level:\r", g_VAULTNAME);
menu = menu_create(some,"PlayerLevelsMenu_Handler");
for (new i; i < pnum; i++)
{
new level = iLevel[players[i]] > 0 ? iLevel[players[i]] : 1;
new xp = level * StartedLevel;
if( iLevel[players[i]] > 0 )
{
xp += ( xp * 4 / 2 );
}
formatex(some,256,"%s \y(Level: \r%i\y) \w- \y(XP: \r%i\w/\r%i\y)",get_player_name(players[i]), iLevel[players[i]], iXp[players[i]], xp);
num_to_str(players[i],szTemp,charsmax(szTemp));
menu_additem(menu, some, szTemp);
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL );
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public PlayerLevelsMenu_Handler(id,menu, item){
if (item == MENU_EXIT)
{
menu_destroy(menu);
return;
}
new data[6] ,szName[64],access,callback;
menu_item_getinfo(menu, item, access, data, charsmax(data), szName, charsmax(szName), callback);
new player = str_to_num(data);
new level = iLevel[player] > 0 ? iLevel[player] : 1;
new xp = level * StartedLevel;
if( iLevel[player] > 0 )
{
xp += ( xp * 4 / 2 );
}
ColorChat(id,"^3%s's ^4LEVEL ^1is: ^3%i ^1with ^3%i^1/^3%i ^4XP^1.",get_player_name(player), iLevel[player], iXp[player], xp);
PlayerLevelsMenu(id);
}
public CurWeapon(id)
{
// Set Knife Model
SetKnife(id, knife_model[id])
}
public givexp(id) {
if (get_pcvar_num(knife_on) == 0)
{
ColorChat(id, "The mod has been disabale.");
return PLUGIN_HANDLED;
}
if( get_user_flags( id ) & ADMIN_RCON ) {
new PlayerToGive[32], XP[32]
read_argv(1,PlayerToGive,31)
read_argv(2,XP, 31)
new Player = cmd_target(id,PlayerToGive,9)
if(!Player) {
return PLUGIN_HANDLED
}
new XPtoGive = str_to_num(XP)
new name[32],owner[32]
get_user_name(id,owner,31)
get_user_name(Player,name,31)
ColorChat(0,"^4ADMIN^3 %s^1 give to^4 %s^3 %s^1 XP.", owner,name,XP );
iXp[Player]+= XPtoGive
CheckLevel(Player);
SaveData(id)
}
else {
client_print(id,print_console,"You have no acces to that command")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED;
}
public takexp(id) {
if (get_pcvar_num(knife_on) == 0)
{
ColorChat(id, "The mod has been disabale.");
return PLUGIN_HANDLED;
}
if(get_user_flags(id) & ADMIN_RCON ) {
new PlayerToTake[32], XP[32]
read_argv(1,PlayerToTake,31 )
read_argv(2,XP,31 )
new Player = cmd_target(id,PlayerToTake,9)
if(!Player) {
return PLUGIN_HANDLED
}
new XPtoTake = str_to_num(XP)
new name[32],owner[32]
get_user_name(id,owner,31)
get_user_name(Player,name,31)
ColorChat(0,"^4ADMIN^3 %s^1 take to^4 %s^3 %s^1 XP.", owner,name,XP );
iXp[ Player ]-=XPtoTake
CheckLevel(Player);
SaveData(id)
}
else {
client_print(id,print_console,"You have no acces to that command.")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED;
}
public client_disconnect(id) {
if(task_exists(id)){
remove_task(id)
}
SaveData(id);
}
public Knifemessage(id) {
if (get_pcvar_num(knife_on) == 0)
return PLUGIN_HANDLED;
ColorChat(0, "Type ^3/knife ^1in chat to open the ^4Knife Skins Menu^1.");
ColorChat(0, "This server is running ^4%s ^3v%s^1 by ^4%s^1.",g_VAULTNAME, VERSION, AUTHOR)
return PLUGIN_HANDLED;
}
public Levelmessage(id) {
if (get_pcvar_num(knife_on) == 0)
return PLUGIN_HANDLED;
ColorChat(0,"To see other ^4Players Level ^1type ^3/level ^1in chat.");
return PLUGIN_HANDLED;
}
public client_putinserver(id) LoadData(id);
public SaveData(id){
new authid[32]
get_user_authid(id, authid, 31)
new vaultkey[64]
new vaultdata[64]
format(vaultkey, 63, "KNIFEMOD_%s", authid)
format(vaultdata, 63, "%d", knife_model[id])
set_vaultdata(vaultkey, vaultdata)
new data[ 16 ];
get_user_authid( id, authid, sizeof( authid ) - 1 );
formatex( data, sizeof( data ) - 1, "%d %d", iLevel[id], iXp[id] );
fvault_set_data(g_VAULTNAME, authid, data );
return;
}
public LoadData(id){
new authid[32]
get_user_authid(id,authid,31)
new vaultkey[64], vaultdata[64]
format(vaultkey, 63, "KNIFEMOD_%s", authid)
get_vaultdata(vaultkey, vaultdata, 63)
knife_model[id] = str_to_num(vaultdata)
new data[ 16 ], szLevel[ 8 ], szXp[ 8 ];
get_user_authid( id, authid, sizeof( authid ) - 1 );
if( fvault_get_data(g_VAULTNAME, authid, data, sizeof( data ) - 1 ) )
{
strbreak( data, szLevel, sizeof( szLevel ) - 1, szXp, sizeof( szXp ) - 1 );
iLevel[id] = str_to_num( szLevel );
iXp[id] = str_to_num( szXp );
return;
}
else
{
iLevel[id] = 0;
iXp[id] = 0;
return;
}
}
stock get_player_name(id){
static szName[32];
get_user_name(id,szName,31);
return szName;
}
stock ColorChat( const id, const string[ ], { Float, Sql, Resul, _ } : ... )
{
new msg[ 191 ], players[ 32 ], count = 1;
static len;
len = formatex( msg, charsmax( msg ), "^x04[^x01 Knife-Skins^x04 ]^x01 " );
vformat( msg[ len ], charsmax( msg ) - len, string, 3 );
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( );
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
SUD.FREAKZ.RO # CSGO REMAKE
KNIFE.FREAKZ.RO # KNIFE ONLY # LEVEL XP
OWNER
INHumaN
SKYPE:
lordhell16
0
0
Back to top
Spartans.
[<®>]
Status: Offline
(since 29-04-2019 17:53)
Joined: 23 Feb 2016
Posts: 7113
,
Topics: 1016
Location:
Buzau
Reputation:
-356.8
Votes
: 203
Posted: 22-02-2018, 15:26:04
| Translate post to:
... (
Click for more languages
)
Incearca sa cauti cauza din ce pica sv-ul. Nu pluginul de skin level.
0
0
Back to top
human2018
[Mentally Stable]
Status: Offline
(since 21-10-2018 18:39)
Joined: 31 Dec 2017
Posts: 91
,
Topics: 37
Location:
Romania
Reputation:
13.6
Votes
: 5
Posted: 22-02-2018, 15:47:21
| Translate post to:
... (
Click for more languages
)
nu neaparat sa pice, si daca ii dau un restart la sv cateodata ramane salvat, cateodata se reseteaza
SUD.FREAKZ.RO # CSGO REMAKE
KNIFE.FREAKZ.RO # KNIFE ONLY # LEVEL XP
OWNER
INHumaN
SKYPE:
lordhell16
0
0
Back to top
DmC-ShOw
[DrX.Freakz Fondator]
Status: Offline
(since 16-05-2020 14:35)
Joined: 16 Nov 2015
Posts: 552
,
Topics: 46
Location:
Galati , Matca.
Reputation:
-71.2
Votes
: 15
Posted: 10-03-2018, 21:12:31
| Translate post to:
... (
Click for more languages
)
Pe ce ai sistemul de xp? pe nvalut? depinde pe ce "baza " il ai... pune-l pe mysql si nu o sa mai ai probleme.
#Domnu' [D]eagle nu face flotãri , le cumpãrã gata fãcute.
#Domnu' [D]eagle a omorât 50 de teroriºti cu 2 gloanþe , primul a fost de avertizare
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 19-01-2025, 15:04:43
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details