It is currently 19 Sep 2018 22:08






Reply to topic  [ 11 posts ] 
 Cerere modificare plugin knife-m 
Author Message
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
Salut am un plugin de knife gasit pe un addon de rusi si as vrea daca se poate sa imi modificati ca el sa functioneze doar pentru echipa CT el fiind destinat pentru zombi

Zombi adica tero sa nu aibe acces si sa nu il influenteze cu nimic doar pe ct

| Afiseaza codul
#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-Skins";
new const VERSION[] = "2.2"
new const AUTHOR[] = "Asafmazon."


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"
};

new const g_KnifevModels[][256] =
{
"models/v_knife.mdl",
"models/Knifes/v_knife_alien.mdl",
"models/Knifes/v_knife_ellium.mdl",
"models/Knifes/v_knife_dark.mdl",
"models/Knifes/v_knife_transparent.mdl",
"models/Knifes/v_knife_genuine.mdl",
"models/Knifes/v_knife_hunt.mdl",
"models/Knifes/v_knife_shadow.mdl",
"models/Knifes/v_knife_slaughterer.mdl",
"models/Knifes/v_knife_katana.mdl",
"models/Knifes/v_knife_assasins.mdl",
"models/Knifes/v_knife_lightsaber.mdl",
"models/Knifes/v_knife_wolverine.mdl",
"models/Knifes/v_knife_proton.mdl"
}

native register_maxlevels( maxlevel = 99, started_xp_level = 100 );
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 13 is the top level, 100 is the started level xp.
register_maxlevels( 13, 100 );

//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", "5" );
cvar_HsXp = register_cvar( "hs_xp", "2" );
cvar_KnifeXp = register_cvar( "knife_xp", "3" );

//Ham's

RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawn", 1 );
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")

//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/Knifes/v_knife_alien.mdl")
precache_model("models/Knifes/v_knife_ellium.mdl")
precache_model("models/Knifes/v_knife_dark.mdl")
precache_model("models/Knifes/v_knife_transparent.mdl")
precache_model("models/Knifes/v_knife_genuine.mdl")
precache_model("models/Knifes/v_knife_hunt.mdl")
precache_model("models/Knifes/v_knife_shadow.mdl")
precache_model("models/Knifes/v_knife_slaughterer.mdl")
precache_model("models/Knifes/v_knife_katana.mdl")
precache_model("models/Knifes/v_knife_assasins.mdl")
precache_model("models/Knifes/v_knife_lightsaber.mdl")
precache_model("models/Knifes/v_knife_wolverine.mdl")
precache_model("models/Knifes/v_knife_proton.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];

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] >= 1 ? "\wAlien Knife [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 1 REQUIRE\d]");
formatex(szEllium, charsmax(szEllium),"%s", iLevel[id] >= 2 ? "\wEllium Knife [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 2 REQUIRE\d]");
formatex(szDark, charsmax(szDark),"%s", iLevel[id] >= 3 ? "\wDark Dagger [\yUNLOCKED\w]" : "\d???? ?????? [\rLEVEL 3 REQUIRE\d]");
formatex(szTransparent, charsmax(szTransparent),"%s", iLevel[id] >= 4 ? "\wTransparent Knife [\yUNLOCKED\w]" : "\d??????????? ????? [\rLEVEL 4 REQUIRE\d]");
formatex(szGenuine, charsmax(szGenuine),"%s", iLevel[id] >= 5 ? "\wGenuine Dagger [\yUNLOCKED\w]" : "\d??????? ?????? [\rLEVEL 5 REQUIRE\d]");
formatex(szHunt, charsmax(szHunt),"%s", iLevel[id] >= 6 ? "\wHunt Blade [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 6 REQUIRE\d]");
formatex(szShadow, charsmax(szShadow),"%s", iLevel[id] >= 7 ? "\wShadow Blade [\yUNLOCKED\w]" : "\d?????? ????? [\rLEVEL 7 REQUIRE\d]");
formatex(szSlaughterer, charsmax(szSlaughterer),"%s", iLevel[id] >= 8 ? "\wSlaughterer Axe [\yUNLOCKED\w]" : "\d??????????? ??? [\rLEVEL 8 REQUIRE\d]");
formatex(szKatana, charsmax(szKatana),"%s", iLevel[id] >= 9 ? "\wGolden Katana [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 9 REQUIRE\d]");
formatex(szAssasins, charsmax(szAssasins),"%s", iLevel[id] >= 10 ? "\wAssasin's Blade [\yUNLOCKED\w]" : "\d???????? ????? [\rLEVEL 10 REQUIRE\d]");
formatex(szLightsaber, charsmax(szLightsaber),"%s", iLevel[id] >= 11 ? "\wLightsaber [\yUNLOCKED\w]" : "\d?????????? [\rLEVEL 11 REQUIRE\d]");
formatex(szWolverine, charsmax(szWolverine),"%s", iLevel[id] >= 12 ? "\wBloody Wolverine Claws [\yUNLOCKED\w]" : "\d?????? ????????? ????? [\rLEVEL 12 REQUIRE\d]");
formatex(szProton, charsmax(szProton),"%s", iLevel[id] >= 13 ? "\wProton Axe [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 13 REQUIRE\d]");

new menu = menu_create( szItem, "KnifeSkinsMenu_Handler" );
menu_additem(menu, "\wNormal Knife [\yUNLOCKED\w]", "", 0 );
menu_additem(menu, szAlien, "", iLevel[id] >= 1 ? 0 : 1);
menu_additem(menu, szEllium, "", iLevel[id] >= 2 ? 0 : 1);
menu_additem(menu, szDark, "", iLevel[id] >= 3 ? 0 : 1);
menu_additem(menu, szTransparent, "", iLevel[id] >= 4 ? 0 : 1);
menu_additem(menu, szGenuine, "", iLevel[id] >= 5 ? 0 : 1);
menu_additem(menu, szHunt, "", iLevel[id] >= 6 ? 0 : 1);
menu_additem(menu, szShadow, "", iLevel[id] >= 7 ? 0 : 1);
menu_additem(menu, szSlaughterer, "", iLevel[id] >= 8 ? 0 : 1);
menu_additem(menu, szKatana, "", iLevel[id] >= 9 ? 0 : 1);
menu_additem(menu, szAssasins, "", iLevel[id] >= 10 ? 0 : 1);
menu_additem(menu, szLightsaber, "", iLevel[id] >= 11 ? 0 : 1);
menu_additem(menu, szWolverine, "", iLevel[id] >= 12 ? 0 : 1);
menu_additem(menu, szProton, "", iLevel[id] >= 13 ? 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( );
}
}
}


Va multumesc :)

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


06 Sep 2018 18:17
Profile multumesc WWW
Online
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2848
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
Mutat in categoria corespunzatoare. Pentru ce mod mai exact?

_________________
„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


06 Sep 2018 19:04
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
Zombie Crown tot un fel de zombie

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


06 Sep 2018 19:10
Profile multumesc WWW
Membru, skill 0
Membru, skill 0

Joined: 28 Nov 2015 23:11
Posts: 39
Location: Bistrita
Detinator Steam: Da
Detinator server CS: AK47.TERORISTII.RO
SteamID: andreas_cs16
Fond eXtream: 0
incearca asta

| Afiseaza codul
#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-Skins";
new const VERSION[] = "2.2"
new const AUTHOR[] = "Asafmazon."


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"
};

new const g_KnifevModels[][256] =
{
"models/v_knife.mdl",
"models/Knifes/v_knife_alien.mdl",
"models/Knifes/v_knife_ellium.mdl",
"models/Knifes/v_knife_dark.mdl",
"models/Knifes/v_knife_transparent.mdl",
"models/Knifes/v_knife_genuine.mdl",
"models/Knifes/v_knife_hunt.mdl",
"models/Knifes/v_knife_shadow.mdl",
"models/Knifes/v_knife_slaughterer.mdl",
"models/Knifes/v_knife_katana.mdl",
"models/Knifes/v_knife_assasins.mdl",
"models/Knifes/v_knife_lightsaber.mdl",
"models/Knifes/v_knife_wolverine.mdl",
"models/Knifes/v_knife_proton.mdl"
}

native register_maxlevels( maxlevel = 99, started_xp_level = 100 );
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 13 is the top level, 100 is the started level xp.
register_maxlevels( 13, 100 );

//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", "5" );
cvar_HsXp = register_cvar( "hs_xp", "2" );
cvar_KnifeXp = register_cvar( "knife_xp", "3" );

//Ham's

RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawn", 1 );
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")

//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/Knifes/v_knife_alien.mdl")
precache_model("models/Knifes/v_knife_ellium.mdl")
precache_model("models/Knifes/v_knife_dark.mdl")
precache_model("models/Knifes/v_knife_transparent.mdl")
precache_model("models/Knifes/v_knife_genuine.mdl")
precache_model("models/Knifes/v_knife_hunt.mdl")
precache_model("models/Knifes/v_knife_shadow.mdl")
precache_model("models/Knifes/v_knife_slaughterer.mdl")
precache_model("models/Knifes/v_knife_katana.mdl")
precache_model("models/Knifes/v_knife_assasins.mdl")
precache_model("models/Knifes/v_knife_lightsaber.mdl")
precache_model("models/Knifes/v_knife_wolverine.mdl")
precache_model("models/Knifes/v_knife_proton.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 )
{
if(get_user_team(id) == 2)
ExecuteForward( Forward_spawn, ForwardReturn, id, iLevel[id], iXp[id] );
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if( get_pcvar_num( knife_on ) == 2 )
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];

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] >= 1 ? "\wAlien Knife [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 1 REQUIRE\d]");
formatex(szEllium, charsmax(szEllium),"%s", iLevel[id] >= 2 ? "\wEllium Knife [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 2 REQUIRE\d]");
formatex(szDark, charsmax(szDark),"%s", iLevel[id] >= 3 ? "\wDark Dagger [\yUNLOCKED\w]" : "\d???? ?????? [\rLEVEL 3 REQUIRE\d]");
formatex(szTransparent, charsmax(szTransparent),"%s", iLevel[id] >= 4 ? "\wTransparent Knife [\yUNLOCKED\w]" : "\d??????????? ????? [\rLEVEL 4 REQUIRE\d]");
formatex(szGenuine, charsmax(szGenuine),"%s", iLevel[id] >= 5 ? "\wGenuine Dagger [\yUNLOCKED\w]" : "\d??????? ?????? [\rLEVEL 5 REQUIRE\d]");
formatex(szHunt, charsmax(szHunt),"%s", iLevel[id] >= 6 ? "\wHunt Blade [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 6 REQUIRE\d]");
formatex(szShadow, charsmax(szShadow),"%s", iLevel[id] >= 7 ? "\wShadow Blade [\yUNLOCKED\w]" : "\d?????? ????? [\rLEVEL 7 REQUIRE\d]");
formatex(szSlaughterer, charsmax(szSlaughterer),"%s", iLevel[id] >= 8 ? "\wSlaughterer Axe [\yUNLOCKED\w]" : "\d??????????? ??? [\rLEVEL 8 REQUIRE\d]");
formatex(szKatana, charsmax(szKatana),"%s", iLevel[id] >= 9 ? "\wGolden Katana [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 9 REQUIRE\d]");
formatex(szAssasins, charsmax(szAssasins),"%s", iLevel[id] >= 10 ? "\wAssasin's Blade [\yUNLOCKED\w]" : "\d???????? ????? [\rLEVEL 10 REQUIRE\d]");
formatex(szLightsaber, charsmax(szLightsaber),"%s", iLevel[id] >= 11 ? "\wLightsaber [\yUNLOCKED\w]" : "\d?????????? [\rLEVEL 11 REQUIRE\d]");
formatex(szWolverine, charsmax(szWolverine),"%s", iLevel[id] >= 12 ? "\wBloody Wolverine Claws [\yUNLOCKED\w]" : "\d?????? ????????? ????? [\rLEVEL 12 REQUIRE\d]");
formatex(szProton, charsmax(szProton),"%s", iLevel[id] >= 13 ? "\wProton Axe [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 13 REQUIRE\d]");

new menu = menu_create( szItem, "KnifeSkinsMenu_Handler" );
menu_additem(menu, "\wNormal Knife [\yUNLOCKED\w]", "", 0 );
menu_additem(menu, szAlien, "", iLevel[id] >= 1 ? 0 : 1);
menu_additem(menu, szEllium, "", iLevel[id] >= 2 ? 0 : 1);
menu_additem(menu, szDark, "", iLevel[id] >= 3 ? 0 : 1);
menu_additem(menu, szTransparent, "", iLevel[id] >= 4 ? 0 : 1);
menu_additem(menu, szGenuine, "", iLevel[id] >= 5 ? 0 : 1);
menu_additem(menu, szHunt, "", iLevel[id] >= 6 ? 0 : 1);
menu_additem(menu, szShadow, "", iLevel[id] >= 7 ? 0 : 1);
menu_additem(menu, szSlaughterer, "", iLevel[id] >= 8 ? 0 : 1);
menu_additem(menu, szKatana, "", iLevel[id] >= 9 ? 0 : 1);
menu_additem(menu, szAssasins, "", iLevel[id] >= 10 ? 0 : 1);
menu_additem(menu, szLightsaber, "", iLevel[id] >= 11 ? 0 : 1);
menu_additem(menu, szWolverine, "", iLevel[id] >= 12 ? 0 : 1);
menu_additem(menu, szProton, "", iLevel[id] >= 13 ? 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( );
}
}
}

_________________
<a href="https://www.gametracker.com/server_info/89.34.92.156:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/89.34.92.156:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>


06 Sep 2018 19:16
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
dei^U wrote:
incearca asta

| Afiseaza codul
#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-Skins";
new const VERSION[] = "2.2"
new const AUTHOR[] = "Asafmazon."


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"
};

new const g_KnifevModels[][256] =
{
"models/v_knife.mdl",
"models/Knifes/v_knife_alien.mdl",
"models/Knifes/v_knife_ellium.mdl",
"models/Knifes/v_knife_dark.mdl",
"models/Knifes/v_knife_transparent.mdl",
"models/Knifes/v_knife_genuine.mdl",
"models/Knifes/v_knife_hunt.mdl",
"models/Knifes/v_knife_shadow.mdl",
"models/Knifes/v_knife_slaughterer.mdl",
"models/Knifes/v_knife_katana.mdl",
"models/Knifes/v_knife_assasins.mdl",
"models/Knifes/v_knife_lightsaber.mdl",
"models/Knifes/v_knife_wolverine.mdl",
"models/Knifes/v_knife_proton.mdl"
}

native register_maxlevels( maxlevel = 99, started_xp_level = 100 );
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 13 is the top level, 100 is the started level xp.
register_maxlevels( 13, 100 );

//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", "5" );
cvar_HsXp = register_cvar( "hs_xp", "2" );
cvar_KnifeXp = register_cvar( "knife_xp", "3" );

//Ham's

RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawn", 1 );
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")

//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/Knifes/v_knife_alien.mdl")
precache_model("models/Knifes/v_knife_ellium.mdl")
precache_model("models/Knifes/v_knife_dark.mdl")
precache_model("models/Knifes/v_knife_transparent.mdl")
precache_model("models/Knifes/v_knife_genuine.mdl")
precache_model("models/Knifes/v_knife_hunt.mdl")
precache_model("models/Knifes/v_knife_shadow.mdl")
precache_model("models/Knifes/v_knife_slaughterer.mdl")
precache_model("models/Knifes/v_knife_katana.mdl")
precache_model("models/Knifes/v_knife_assasins.mdl")
precache_model("models/Knifes/v_knife_lightsaber.mdl")
precache_model("models/Knifes/v_knife_wolverine.mdl")
precache_model("models/Knifes/v_knife_proton.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 )
{
if(get_user_team(id) == 2)
ExecuteForward( Forward_spawn, ForwardReturn, id, iLevel[id], iXp[id] );
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if( get_pcvar_num( knife_on ) == 2 )
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];

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] >= 1 ? "\wAlien Knife [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 1 REQUIRE\d]");
formatex(szEllium, charsmax(szEllium),"%s", iLevel[id] >= 2 ? "\wEllium Knife [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 2 REQUIRE\d]");
formatex(szDark, charsmax(szDark),"%s", iLevel[id] >= 3 ? "\wDark Dagger [\yUNLOCKED\w]" : "\d???? ?????? [\rLEVEL 3 REQUIRE\d]");
formatex(szTransparent, charsmax(szTransparent),"%s", iLevel[id] >= 4 ? "\wTransparent Knife [\yUNLOCKED\w]" : "\d??????????? ????? [\rLEVEL 4 REQUIRE\d]");
formatex(szGenuine, charsmax(szGenuine),"%s", iLevel[id] >= 5 ? "\wGenuine Dagger [\yUNLOCKED\w]" : "\d??????? ?????? [\rLEVEL 5 REQUIRE\d]");
formatex(szHunt, charsmax(szHunt),"%s", iLevel[id] >= 6 ? "\wHunt Blade [\yUNLOCKED\w]" : "\d???? ????? [\rLEVEL 6 REQUIRE\d]");
formatex(szShadow, charsmax(szShadow),"%s", iLevel[id] >= 7 ? "\wShadow Blade [\yUNLOCKED\w]" : "\d?????? ????? [\rLEVEL 7 REQUIRE\d]");
formatex(szSlaughterer, charsmax(szSlaughterer),"%s", iLevel[id] >= 8 ? "\wSlaughterer Axe [\yUNLOCKED\w]" : "\d??????????? ??? [\rLEVEL 8 REQUIRE\d]");
formatex(szKatana, charsmax(szKatana),"%s", iLevel[id] >= 9 ? "\wGolden Katana [\yUNLOCKED\w]" : "\d?????? ?????? [\rLEVEL 9 REQUIRE\d]");
formatex(szAssasins, charsmax(szAssasins),"%s", iLevel[id] >= 10 ? "\wAssasin's Blade [\yUNLOCKED\w]" : "\d???????? ????? [\rLEVEL 10 REQUIRE\d]");
formatex(szLightsaber, charsmax(szLightsaber),"%s", iLevel[id] >= 11 ? "\wLightsaber [\yUNLOCKED\w]" : "\d?????????? [\rLEVEL 11 REQUIRE\d]");
formatex(szWolverine, charsmax(szWolverine),"%s", iLevel[id] >= 12 ? "\wBloody Wolverine Claws [\yUNLOCKED\w]" : "\d?????? ????????? ????? [\rLEVEL 12 REQUIRE\d]");
formatex(szProton, charsmax(szProton),"%s", iLevel[id] >= 13 ? "\wProton Axe [\yUNLOCKED\w]" : "\d?????? ??? [\rLEVEL 13 REQUIRE\d]");

new menu = menu_create( szItem, "KnifeSkinsMenu_Handler" );
menu_additem(menu, "\wNormal Knife [\yUNLOCKED\w]", "", 0 );
menu_additem(menu, szAlien, "", iLevel[id] >= 1 ? 0 : 1);
menu_additem(menu, szEllium, "", iLevel[id] >= 2 ? 0 : 1);
menu_additem(menu, szDark, "", iLevel[id] >= 3 ? 0 : 1);
menu_additem(menu, szTransparent, "", iLevel[id] >= 4 ? 0 : 1);
menu_additem(menu, szGenuine, "", iLevel[id] >= 5 ? 0 : 1);
menu_additem(menu, szHunt, "", iLevel[id] >= 6 ? 0 : 1);
menu_additem(menu, szShadow, "", iLevel[id] >= 7 ? 0 : 1);
menu_additem(menu, szSlaughterer, "", iLevel[id] >= 8 ? 0 : 1);
menu_additem(menu, szKatana, "", iLevel[id] >= 9 ? 0 : 1);
menu_additem(menu, szAssasins, "", iLevel[id] >= 10 ? 0 : 1);
menu_additem(menu, szLightsaber, "", iLevel[id] >= 11 ? 0 : 1);
menu_additem(menu, szWolverine, "", iLevel[id] >= 12 ? 0 : 1);
menu_additem(menu, szProton, "", iLevel[id] >= 13 ? 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( );
}
}
}


Nu , este tot acelasi lucru

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


06 Sep 2018 19:33
Profile multumesc WWW
Online
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2848
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
Lasa mi nativele modului

_________________
„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


09 Sep 2018 13:39
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
pluginul functioneaza si acum asa cum este doar ca , nu vreau sa mearga si pentru Tero (zombie )


| Afiseaza codul
#include <zombiecrown>


if ( is_user_alive( id ) && zp_get_user_zombie( id ) )
{
server_print( "Player %d is alive and a zombie", id )
}
native zp_get_user_zombie_class(id)

native zp_get_user_first_zombie(id)

native zp_get_user_zombie(id)

native zp_get_user_last_zombie(id)

native zp_get_user_last_human(id)

native zp_get_user_human_class(id)

Ce native trebuiesc ?

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


09 Sep 2018 13:55
Profile multumesc WWW
Online
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2848
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
Postează fișierul zombiecrown.inc din include

_________________
„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


09 Sep 2018 14:16
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
| Afiseaza codul
/*================================================================================

-------------------------------------------------------
------------*- Zombie Crown *------------
-------------------------------------------------------

~~~~~~~~~~
- How To -
~~~~~~~~~~

To make use of the Zombie Plague API features in your plugin, just
add the following line at the beginning of your script:

#include <zombiecrown>

~~~~~~~~~~~
- Natives -
~~~~~~~~~~~

These work just like any other functions: you may have to pass
parameters and they usually return values.

Example:

if ( is_user_alive( id ) && zp_get_user_zombie( id ) )
{
server_print( "Player %d is alive and a zombie", id )
}

~~~~~~~~~~~~
- Forwards -
~~~~~~~~~~~~

Forwards get called whenever an event happens during the game.
You need to make a public callback somewhere on your script,
and it will automatically be triggered when the event occurs.

Example:

public zp_user_infected_post( id, infector, nemesis, assassin)
{
if ( !infector || nemesis )
return;

server_print( "Player %d just got infected by %d!", id, infector )
}

Also, take note of cases when there's a suffix:

* _pre : means the forward will be called BEFORE the event happens
* _post : means it will be called AFTER the event takes place

=================================================================================*/

#if defined _zombiecrown_included
#endinput
#endif
#define _zombiecrown_included

/* Flags */
#define ZV_MAIN (1<<0)
#define ZV_MULTI (1<<1)
#define ZV_UNLIMITED (1<<2)
#define ZV_DAMAGE (1<<3)

/* Teams for zp_register_extra_item() */
#define ZP_TEAM_ZOMBIE (1<<0)
#define ZP_TEAM_HUMAN (1<<1)
#define ZP_TEAM_NEMESIS (1<<2)
#define ZP_TEAM_SURVIVOR (1<<3)
#define ZP_TEAM_SNIPER (1<<4)
#define ZP_TEAM_ASSASSIN (1<<5)
#define ZP_TEAM_FLAMER (1<<6)
#define ZP_TEAM_GENESYS (1<<6)
#define ZP_TEAM_OBERON (1<<6)
#define ZV_TEAM_ZOMBIE (1<<0)
#define ZV_TEAM_HUMAN (1<<1)
#define ZV_TEAM_NEMESIS (1<<2)
#define ZV_TEAM_SURVIVOR (1<<3)
#define ZV_TEAM_SNIPER (1<<4)
#define ZV_TEAM_ASSASSIN (1<<5)
#define ZV_TEAM_FLAMER (1<<6)
#define ZV_TEAM_GENESYS (1<<6)
#define ZV_TEAM_OBERON (1<<6)

/* Game modes for zp_round_started() */
enum
{
MODE_INFECTION = 1,
MODE_NEMESIS,
MODE_SURVIVOR,
MODE_SWARM,
MODE_MULTI,
MODE_PLAGUE,
MODE_SNIPER,
MODE_ASSASSIN,
MODE_GENESYS,
MODE_FLAMER,
MODE_OBERON,
MODE_LNJ
}

/* Winner teams for zp_round_ended() */
enum
{
WIN_NO_ONE = 0,
WIN_ZOMBIES,
WIN_HUMANS
}

/* Restriction types for zp_register_extra_item( ) */
enum
{
REST_NONE = 0, // No restriction
REST_ROUND, // x times per round
REST_XROUNDS, // Once in x rounds
REST_MAP // x times per map
}

/* Custom forward return values */
#define ZP_PLUGIN_HANDLED 97
#define ZV_PLUGIN_HANDLED 97

/**
* Returns whether a player is a zombie.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_zombie(id)


/**
* Returns whether a player is a nemesis.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_nemesis(id)

/**
* Returns whether a player is a survivor.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_survivor(id)

/**
* Returns whether a player is the first zombie.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_first_zombie(id)

/**
* Returns whether a player is the last zombie.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_last_zombie(id)

/**
* Returns whether a player is the last human.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_last_human(id)

/**
* Returns whether a player is zombie hero.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_zombie_hero(id)

/**
* Returns whether a player is a human hero.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_human_hero(id)

/**
* Returns whether a round is hero.
*
* @return True if it is, false otherwise.
*/
native zp_is_hero_round()

/**
* Returns a player's current zombie class ID.
*
* @param id Player index.
* @return Internal zombie class ID, or -1 if not yet chosen.
*/
native zp_get_user_zombie_class(id)


/**
* Returns a player's next zombie class ID (for the next infection).
*
* @param id Player index.
* @return Internal zombie class ID, or -1 if not yet chosen.
*/
native zp_get_user_next_class(id)

/**
* Sets a player's next zombie class ID (for the next infection).
*
* @param id Player index.
* @param classid A valid zombie class ID.
* @return True on success, false otherwise.
*/
native zp_set_user_zombie_class(id, classid)

/**
* Returns a player's current human class ID.
*
* @param id Player index.
* @return Internal human class ID, or -1 if not yet chosen.
*/
native zp_get_user_human_class(id)

/**
* Returns a player's next human class ID (for the next disinfection).
*
* @param id Player index.
* @return Internal human class ID, or -1 if not yet chosen.
*/
native zp_get_user_next_hclass(id)

/**
* Sets a player's next human class ID (for the next disinfection).
*
* @param id Player index.
* @param classid A valid human class ID.
* @return True on success, false otherwise.
*/
native zp_set_user_human_class(id, classid)

/**
* Returns a player's ammo pack count.
*
* @param id Player index.
* @return Number of ammo packs owned.
*/
native zp_get_user_ammo_packs(id)

/**
* Sets a player's ammo pack count.
*
* @param id Player index.
* @param amount New quantity of ammo packs owned.
*/
native zp_set_user_ammo_packs(id, amount)

/**
* Returns the default maximum health of a zombie.
*
* Note: Takes into account first zombie's HP multiplier.
*
* @param id Player index.
* @return Maximum amount of health points, or -1 if not a normal zombie.
*/
native zp_get_zombie_maxhealth(id)

/**
* Returns the default maximum health of a human.
*
* @param id Player index.
* @return Maximum amount of health points, or -1 if not a normal human.
*/
native zp_get_human_maxhealth(id)

/**
* Returns a player's custom flashlight batteries charge.
*
* @param id Player index.
* @return Charge percent (0 to 100).
*/
native zp_get_user_batteries(id)

/**
* Sets a player's custom flashlight batteries charge.
*
* @param id Player index.
* @param value New charge percent (0 to 100).
*/
native zp_set_user_batteries(id, charge)

/**
* Returns whether a player has night vision.
*
* @param id Player index.
* @return True if it has, false otherwise.
*/
native zp_get_user_nightvision(id)

/**
* Sets whether a player has night vision.
*
* @param id Player index.
* @param set True to give, false for removing it.
*/
native zp_set_user_nightvision(id, set)

/**
* Forces a player to become a zombie.
*
* Note: Unavailable for last human/survivor/sniper/flamer.
*
* @param id Player index to be infected.
* @param infector Player index who infected him (optional).
* @param silent If set, there will be no HUD messages or infection sounds.
* @param rewards Whether to show DeathMsg and reward frags, hp, and ammo packs to infector.
* @return True on success, false otherwise.
*/
native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)

/**
* Forces a player to become a human.
*
* Note: Unavailable for last zombie/nemesis.
*
* @param id Player index to be cured.
* @param silent If set, there will be no HUD messages or antidote sounds.
* @return True on success, false otherwise.
*/
native zp_disinfect_user(id, silent = 0)

/**
* Forces a player to become a nemesis.
*
* Note: Unavailable for last human/survivor/sniper/flamer.
*
* @param id Player index to turn into nemesis.
* @return True on success, false otherwise.
*/
native zp_make_user_nemesis(id)

/**
* Forces a player to become a survivor.
*
* Note: Unavailable for last zombie/nemesis.
*
* @param id Player index to turn into survivor.
* @return True on success, false otherwise.
*/
native zp_make_user_survivor(id)

/**
* Respawns a player into a specific team.
*
* @param id Player index to be respawned.
* @param team Team to respawn the player into (ZP_TEAM_ZOMBIE or ZP_TEAM_HUMAN).
* @return True on success, false otherwise.
*/
native zp_respawn_user(id, team)

/**
* Forces a player to buy an extra item.
*
* @param id Player index.
* @param itemid A valid extra item ID.
* @param ignorecost If set, item's cost won't be deduced from player.
* @param ignorerest If set, item's restriction will be ignored.
* @return True on success, false otherwise.
*/
native zp_force_buy_extra_item(id, itemid, ignorecost = 0, ignorerest = 0)

/**
* Returns whether a player is a sniper.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_sniper(id)

/**
* Forces a player to become a sniper.
*
* Note: Unavailable for last zombie/nemesis/assassin.
*
* @param id Player index to turn into sniper.
* @return True on success, false otherwise.
*/
native zp_make_user_sniper(id)

/**
* Returns whether a player is a flamer.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_flamer(id)

/**
* Returns whether the current round is a flamer round.
*
* @return True if it is, false otherwise.
*/
native zp_is_flamer_round()

/**
* Forces a player to become a flamer.
*
* Note: Unavailable for last zombie/nemesis/assassin/genesys.
*
* @param id Player index to turn into flamer.
* @return True on success, false otherwise.
*/
native zp_make_user_flamer(id)

/**
* Forces a player to become a genesys.
*
* Note: Unavailable for last human/survivor/sniper/flamer.
*
* @param id Player index to turn into genesys.
* @return True on success, false otherwise.
*/
native zp_make_user_genesys(id)

/**
* Returns whether a player is a genesys.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_genesys(id)

/**
* Returns whether the current round is a genesys round.
*
* @return True if it is, false otherwise.
*/
native zp_is_genesys_round()

/**
* Forces a player to become a oberon.
*
* Note: Unavailable for last human/survivor/sniper/flamer.
*
* @param id Player index to turn into oberon.
* @return True on success, false otherwise.
*/
native zp_make_user_oberon(id)

/**
* Returns whether a player is a oberon.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_oberon(id)

/**
* Returns whether the current round is a oberon round.
*
* @return True if it is, false otherwise.
*/
native zp_is_oberon_round()

/**
* Returns whether a player is an assassin.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_assassin(id)

/**
* Returns whether a player is an dragon.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_dragon(id)

/**
* Returns whether a player is an zadoc.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_zadoc(id)

/**
* Forces a player to become a assassin.
*
* Note: Unavailable for last human/survivor/sniper/flamer.
*
* @param id Player index to turn into assassin.
* @return True on success, false otherwise.
*/
native zp_make_user_assassin(id)

/**
* Forces a player to become a assassin.
*
* Note: Unavailable for last human/survivor/sniper/flamer/zadoc.
*
* @param id Player index to turn into dragon.
* @return True on success, false otherwise.
*/
native zp_make_user_dragon(id)

/**
* Forces a player to become a assassin.
*
* Note: Unavailable for last human
*
* @param id Player index to turn into zadoc.
* @return True on success, false otherwise.
*/
native zp_make_user_zadoc(id)

/**
* Returns whether the ZP round has started, i.e. first zombie
* has been chosen or a game mode has begun.
*
* @return 0 - Round not started
* 1 - Round started
* 2 - Round starting
*/
native zp_has_round_started()

/**
* Returns whether the current round is a nemesis round.
*
* @return True if it is, false otherwise.
*/
native zp_is_nemesis_round()

/**
* Returns whether the current round is a survivor round.
*
* @return True if it is, false otherwise.
*/
native zp_is_survivor_round()

/**
* Returns whether the current round is a swarm round.
*
* @return True if it is, false otherwise.
*/
native zp_is_swarm_round()

/**
* Returns whether the current round is a plague round.
*
* @return True if it is, false otherwise.
*/
native zp_is_plague_round()

/**
* Returns whether the current round is a Armageddon round.
*
* @return True if it is, false otherwise.
*/
native zp_is_lnj_round()

/**
* Returns number of alive zombies.
*
* @return Zombie count.
*/
native zp_get_zombie_count()

/**
* Returns number of alive humans.
*
* @return Human count.
*/
native zp_get_human_count()

/**
* Returns number of alive nemesis.
*
* @return Nemesis count.
*/
native zp_get_nemesis_count()

/**
* Returns number of alive survivors.
*
* @return Survivor count.
*/
native zp_get_survivor_count()

/**
* Returns whether the current round is a sniper round.
*
* @return True if it is, false otherwise.
*/
native zp_is_sniper_round()

/**
* Returns whether the current round is a assassin round.
*
* @return True if it is, false otherwise.
*/
native zp_is_assassin_round()

/**
* Returns whether the current round is a dragon round.
*
* @return True if it is, false otherwise.
*/
native zp_is_dragon_round()

/**
* Returns whether the current round is a zadoc round.
*
* @return True if it is, false otherwise.
*/
native zp_is_zadoc_round()

/**
* Returns number of alive snipers.
*
* @return Sniper count.
*/
native zp_get_sniper_count()

/**
* Returns number of alive assassins.
*
* @return Assassin count.
*/
native zp_get_assassin_count()

/**
* Returns number of alive dragons.
*
* @return Dragon count.
*/
native zp_get_dragon_count()

/**
* Returns number of alive zadocs.
*
* @return Zadoc count.
*/
native zp_get_zadoc_count()

/**
* Registers a custom item which will be added to the extra items menu of ZP.
*
* Note: The returned extra item ID can be later used to catch item
* purchase events for the zp_extra_item_selected() forward.
*
* Note: ZP_TEAM_NEMESIS, ZP_TEAM_SURVIVOR, ZP_TEAM_ASSASSIN, ZP_TEAM_SNIPER,
* ZP_TEAM_GENESYS, ZP_TEAM_FLAMER and ZP_TEAM_OBERON can be used to make an item available to Nemesis,
* Survivors, Assassins, Snipers and Bombardiers.
*
* @param name Caption to display on the menu.
* @param cost Ammo packs to be deducted on purchase.
* @param teams Bitsum of teams it should be available for.
* @param restriction Type of restriction
* @param limit Limit of the restriction
* @return An internal extra item ID, or -1 on failure.
*/
native zp_register_extra_item(const name[], cost, teams, restriction = 0, limit = 0)

/**
* Registers a custom class which will be added to the zombie classes menu of ZP.
*
* Note: The returned zombie class ID can be later used to identify
* the class when calling the zp_get_user_zombie_class() natives.
*
* @param name Caption to display on the menu.
* @param info Brief description of the class.
* @param model Player model to be used.
* @param clawmodel Player model to be used.
* @param hp Initial health points.
* @param speed Maximum speed.
* @param gravity Gravity multiplier.
* @param knockback Knockback multiplier.
* @param level Level.
* @return An internal zombie class ID, or -1 on failure.
*/
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback, level)

/**
* Registers a custom class which will be added to the human classes menu of ZP.
*
* Note: The returned human class ID can be later used to identify
* the class when calling the zp_get_user_human_class() natives.
*
* @param name Caption to display on the menu.
* @param info Brief description of the class.
* @param model Player model to be used.
* @param hp Initial health points.
* @param speed Maximum speed.
* @param gravity Gravity multiplier.
* @param level Level.
* @return An internal human class ID, or -1 on failure.
*/
native zp_register_human_class(const name[], const info[], const model[], hp, speed, Float:gravity, level)

/**
* Returns an extra item's ID.
*
* @param name Item name to look for.
* @return Internal extra item ID, or -1 if not found.
*/
native zp_get_extra_item_id(const name[])

/**
* Returns a zombie class' ID.
*
* @param name Class name to look for.
* @return Internal zombie class ID, or -1 if not found.
*/
native zp_get_zombie_class_id(const name[])

/**
* Called when the ZP round starts, i.e. first zombie
* is chosen or a game mode begins.
*
* @param gamemode Mode which has started.
* @param id Affected player's index (if applicable).
*/
forward zp_round_started(gamemode, id)

/**
* Called when the round ends.
*
* @param winteam Team which has won the round.
*/
forward zp_round_ended(winteam)

/**
* Called when a player gets infected.
*
* @param id Player index who was infected.
* @param infector Player index who infected him (if applicable).
* @param nemesis Whether the player was turned into a nemesis.
*/
forward zp_user_infected_pre(id, infector, nemesis, assassin)
forward zp_user_infected_post(id, infector, nemesis, assassin)

/**
* Called when a player turns back to human.
*
* @param id Player index who was cured.
* @param survivor Whether the player was turned into a survivor.
*/
forward zp_user_humanized_pre(id, survivor, sniper, flamer)
forward zp_user_humanized_post(id, survivor, sniper, flamer)
forward zp_user_humanized_pre(id, sniper)
forward zp_user_humanized_post(id, sniper)
forward zp_user_humanized_pre(id, flamer)
forward zp_user_humanized_post(id, flamer)
forward zp_user_humanized_pre(id, zadoc)
forward zp_user_humanized_post(id, zadoc)

/**
* Called on a player infect/cure attempt. You can use this to block
* an infection/humanization by returning ZP_PLUGIN_HANDLED in your plugin.
*
* Note: Right now this is only available after the ZP round starts, since some
* situations (like blocking a first zombie's infection) are not yet handled.
*/
forward zp_user_infect_attempt(id, infector, nemesis)
forward zp_user_humanize_attempt(id, survivor)
forward zp_user_humanize_attempt(id, sniper)
forward zp_user_humanize_attempt(id, flamer)

/**
* Called when a player buys an extra item from the ZP menu.
*
* Note: You can now return ZP_PLUGIN_HANDLED in your plugin to block
* the purchase and the player will be automatically refunded.
*
* @param id Player index of purchaser.
* @param itemid Internal extra item ID.
*/
forward zp_extra_item_selected(id, itemid)

/**
* Called when a player gets unfrozen (frostnades).
*
* @param id Player index.
*/
forward zp_user_unfrozen(id)

/**
* Called when a player gets infection-grenade.
*
* @param id Player index.
*/
forward zp_user_infected_bybomb(id)

/**
* Called when a player spawned.
*
* @param id Player index who was cured.
*/
forward zp_user_spawned_pre(id)
forward zp_user_spawned_post(id)

/**
* Called on hclass.
*
* @param id Player hclass.
*/
forward zp_hclass_param(id)

/**
* Called when a player becomes the last zombie.
*
* Note: This is called for the first zombie too.
*
* @param id Player index.
*/
forward zp_user_last_zombie(id)

/**
* Called when a player becomes the last human.
*
* @param id Player index.
*/
forward zp_user_last_human(id)

/**
* @deprecated - Do not use!
* For backwards compatibility only.
*/
#define ZP_TEAM_ANY 0

/**
* Returns a player's level count.
*
* @param id Player index.
* @return Number of level owned.
*/
native zp_get_user_level(id)

/**
* Set player level
*
* @param id Player index.
* @return Number of level owned.
*/
native zp_set_user_level(id, amount)

/**
* Returns a player's Total Power count.
*
* @param id Player index.
* @return Number of coins owned.
*/
native zp_get_user_tpower(id)

/**
* Returns a player's points count.
*
* @param id Player index.
* @return Number of points owned.
*/
native zp_get_user_points(id)

/**
* Sets a player's points count.
*
* @param id Player index.
* @param amount Number of points added.
*/
native zp_set_user_points(id, amount)

/**
* Returns whether a player is stunned.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_get_user_stunned(id)

/**
* Activate all plugins.
*
* @return True if it is, false otherwise.
*/
native unknown()

/**
* SaveLevel player.
*
* @param id Player index.
*/
native SaveLevel(id)

/**
* SaveDate player.
*
* @param id Player index.
*/
native SaveDate(id)

/**
* Returns a player's XP count.
*
* @param id Player index.
* @return Number of xp owned.
*/
native zp_get_user_xp(id)

/**
* Sets a player's XP count.
*
* @param id Player index.
* @param amount Number of xp added.
*/
native zp_set_user_xp(id, amount)

/**
* Returns a player's coins count.
*
* @param id Player index.
* @return Number of coins owned.
*/
native zp_get_user_coins(id)

/**
* Sets a player's coins count.
*
* @param id Player index.
* @param amount Number of coins added.
*/
native zp_set_user_coins(id, amount)

/**
* Returns a player's tokens count.
*
* @param id Player index.
* @return Number of tokens owned.
*/
native zp_get_user_tokens(id)

/**
* Sets a player's tokens count.
*
* @param id Player index.
* @param amount Number of tokens added.
*/
native zp_set_user_tokens(id, amount)

/**
* Returns a player's energy count.
*
* @param id Player index.
* @return Number of energy owned.
*/
native zp_get_user_energy(id)

/**
* Sets a player's energy count.
*
* @param id Player index.
* @param amount Number of energy added.
*/
native zp_set_user_energy(id, amount)

/**
* Sets a player's off buy custom.
*
* @param id Player index.
*/
native zp_set_user_blockbuy(id)

/**
* If the user is frozen
*
* @param id Player index.
*/
native zp_get_user_frozen(id)

/**
* Set if user should be frozen
*
* @param id Player index.
* @param set True to set, false for removing it.
*/
native zp_set_user_frozen(id, set)

/* Registers extra items on this plugin for VIPs (Only if MODE 2 is active)
*
* @param name Extra item name.
* @param cost How much ammo packs will cost this item for player.
* @param team Teams allowed to buy this item. (0 for all teams)
* @return Extra item id.
*/
native zv_register_extra_item(const name[], cost, team)

/* Gets user flags (Only if MODE 1 is active)
*
* @param id Player index.
* @return Player flags.
*/
native zv_get_user_flags(id)

/* Forwards */

/* Called then player selects extra item in his VIP meniu. (Only if MODE 2 is active)
*
* You can stop player of buing item returning ZV_PLUGIN_HANDLED.
* Player will be refunded automaticaly
*
* @param id Player index.
* @param itemid Extra item id, witch player bought.
*/
forward zv_extra_item_selected(id, itemid)

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


09 Sep 2018 14:21
Profile multumesc WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
UP 16.09.2018

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


16 Sep 2018 16:04
Profile multumesc WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 22 Jul 2015 00:01
Posts: 222
Detinator Steam: Da
CS Status: Tot ce se poate.
Detinator server CS: 89.34.25.238:27015
SteamID: Da
Fond eXtream: 0
Cineva ?

_________________
ZOMBIE CROWN ROMANIA.
The NeW Wolrd Zombie
view server | Afiseaza codul
[ Mod: Image] [Statistici: Image ][IP: Image ]


18 Sep 2018 14:33
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 39 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