Raised This Month: $ Target: $400
 0% 

Bad Load Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Raul3w
Member
Join Date: Apr 2017
Old 06-03-2017 , 07:35   Bad Load Plugin
Reply With Quote #1

This plugin created by me.

Quote:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

new const PLUGIN[] = "Builder Knifes";
new const VERSION[] = "0.5";
new const AUTHOR[] = "Raul3w";

#pragma semicolon 1

#define VIP_FLAG ADMIN_LEVEL_H

new const Knife1Model[66] = "models/knifebb/v_blade_brick.mdl";
new const Knife2Model[66] = "models/knifebb/v_knife3.mdl";
new const Knife3Model[66] = "models/knifebb/v_knife_wolf.mdl";
new const Knife4Model[66] = "models/knifebb/v_knife_brick.mdl";
new const Knife5Model[66] = "models/knifebb/v_stormgiant.mdl";

new const KnifeGold1Model[66] = "models/knifebb/v_warmagnum.mdl";
new const KnifeGold2Model[66] = "models/knifebb/v_hammer_silver";
new const KnifeGold3Model[66] = "models/knifebb/v_knife_marin";
new const KnifeGold4Model[66] = "models/knifebb/v_molot_tora";
new const KnifeGold5Model[66] = "models/knifebb/v_warhammer_royale";
new const KnifeGold6Model[66] = "models/knifebb/v_hammer_minion.mdl";
new const KnifeGold7Model[66] = "models/knifebb/v_Galaxy_Ham.mdl";
new const KnifeGold8Model[66] = "models/knifebb/v_vulcanus.mdl";

new bool: Knife1[33];
new bool: Knife2[33];
new bool: Knife3[33];
new bool: Knife4[33];
new bool: Knife5[33];

new bool: KnifeGold1[33];
new bool: KnifeGold2[33];
new bool: KnifeGold3[33];
new bool: KnifeGold4[33];
new bool: KnifeGold5[33];
new bool: KnifeGold6[33];
new bool: KnifeGold7[33];
new bool: KnifeGold8[33];

new bool: KnifeChoosen[33];

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);

register_clcmd("say /knife","SayKnife");

register_event("CurWeapon", "CurentWeapon", "be", "1=1");
RegisterHam(Ham_Spawn, "player", "Spawn", 1);
RegisterHam(Ham_TakeDamage, "player", "DamageKnife");

}

public Spawn(id) {
if(is_user_alive(id))
{
KnifeChoosen[id] = false;

Knife1[id] = false;
Knife2[id] = false;
Knife3[id] = false;
Knife4[id] = false;
Knife5[id] = false;

KnifeGold1[id] = false;
KnifeGold2[id] = false;
KnifeGold3[id] = false;
KnifeGold4[id] = false;
KnifeGold5[id] = false;
KnifeGold6[id] = false;
KnifeGold7[id] = false;
KnifeGold8[id] = false;

if(cs_get_user_team(id) == CS_TEAM_CT) {
MenuKnife(id);
}
}
}

public plugin_precache() {
precache_model(Knife1Model);
precache_model(Knife2Model);
precache_model(Knife3Model);
precache_model(Knife4Model);
precache_model(Knife5Model);

precache_model(KnifeGold1Model);
precache_model(KnifeGold2Model);
precache_model(KnifeGold3Model);
precache_model(KnifeGold4Model);
precache_model(KnifeGold5Model);
precache_model(KnifeGold6Model);
precache_model(KnifeGold7Model);
precache_model(KnifeGold8Model);
}

public client_putinserver(id) {
Knife1[id] = false;
Knife2[id] = false;
Knife3[id] = false;
Knife4[id] = false;
Knife5[id] = false;

KnifeGold1[id] = false;
KnifeGold2[id] = false;
KnifeGold3[id] = false;
KnifeGold4[id] = false;
KnifeGold5[id] = false;
KnifeGold6[id] = false;
KnifeGold7[id] = false;
KnifeGold8[id] = false;
}

public MenuKnife(id)
{
new menu = menu_create ("\rBB\w.\yEcila\w.\rRo \yKnife \rMenu", "CaseMenu");

menu_additem(menu, "\yPlayer \rKnife", "1");
menu_additem(menu, "\yV\w.\yI\w.\yP \rKnife", "2");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0 );

return 1;
}

public CaseMenu(id, menu, item) {
if(item == MENU_EXIT) {
return 1;
}

new data [6], szName [64];
new access, callback;
menu_item_getinfo (menu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:
{
MenuPlayeri(id);
}

case 2:
{
if( get_user_flags( id ) & VIP_FLAG ) {
MenuVIP(id);
}
else
{
ChatColor(id, "!g[Builder Knife]!nAcest meniu poate fi accesat doar de membri !gVIP");
MenuKnife(id);
}
}
}

menu_destroy (menu);
return 1;
}
public MenuPlayeri(id) {
new menu = menu_create ("\yBuilder \rPlayer \yKnife \rMenu", "CaseKnifePlayeri");
menu_additem(menu, "\yBlade \rBrick", "1");
menu_additem(menu, "\yThanatos \rGreen", "2");
menu_additem(menu, "\yWolverin \rKnife", "3");
menu_additem(menu, "\yWarHammer \rBrick", "4");
menu_additem(menu, "\yStorm \rHammer", "5");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0 );

return 1;
}

public CaseKnifePlayeri(id, menu, item) {
if(item == MENU_EXIT) {
return 1;
}
if(!(is_user_alive(id))) {
ChatColor(id, "!g[Builder Knife] !nNu poti alege cutitul atunci cānd esti mort");
return 1;
}

new data [6], szName [64];
new access, callback;
menu_item_getinfo (menu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:
{
KnifeChoosen[id] = true;
Knife1[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi Ales !gSabie din Cuburi");
}

case 2:
{
KnifeChoosen[id] = true;
Knife2[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi Ales !gCoasa Verde");
}

case 3:
{
KnifeChoosen[id] = true;
Knife3[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWolverin Knife");
}
case 4:
{
KnifeChoosen[id] = true;
Knife4[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gHammer Din Cuburi");
}
case 5:
{
KnifeChoosen[id] = true;
Knife5[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gStorm Giant");
}
}

menu_destroy (menu);
return 1;
}


public MenuVIP(id) {
new menu = menu_create ("\yBuilder \rVIP \yKnife \rMenu", "CaseKnifeVIP");
menu_additem(menu, "\wWarHammer \rMagnum", "1");
menu_additem(menu, "\wWarHammer \rSilver ", "2");
menu_additem(menu, "\wWarHammer \rMarin", "3");
menu_additem(menu, "\wWarHammer \rViollete", "4");
menu_additem(menu, "\wWarHammer \rRoyal \[rOnly yGold Vip]", "5" ADMIN_LEVEL_G);
menu_additem(menu, "\wWarHammer \yMinion \[rOnly yGold Vip]", "6" ADMIN_LEVEL_G);
menu_additem(menu, "\wGalaxy \rHammer \[rOnly Owners]", "7" ADMIN_RCON);
menu_additem(menu, "\wWarHammer \ySkull \[rOnly Owners]", "8" ADMIN_RCON);

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0 );

return 1;
}

public CaseKnifeVIP(id, menu, item) {
if(item == MENU_EXIT) {
return 1;
}

if(!(is_user_alive(id))) {
ChatColor(id, "!g[Builder Knife] !nNu poti alege cutitul atunci cānd esti mort");
return 1;
}

new data [6], szName [64];
new access, callback;
menu_item_getinfo (menu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:
{
KnifeChoosen[id] = true;
KnifeGold1[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Magnum");
}

case 2:
{
KnifeChoosen[id] = true;
KnifeGold2[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Silver");
}

case 3:
{
KnifeChoosen[id] = true;
KnifeGold3[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Marin");
}
case 4:
{
KnifeChoosen[id] = true;
KnifeGold4[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Viollete");
}
case 5:
{
KnifeChoosen[id] = true;
KnifeGold5[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Royal");
}
case 6:
{
KnifeChoosen[id] = true;
KnifeGold6[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Minion");
}
case 7:
{
KnifeChoosen[id] = true;
KnifeGold7[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gGalaxy Hammer");
}
case 8:
{
KnifeChoosen[id] = true;
KnifeGold8[id] = true;
CurentWeapon(id);
ChatColor(id, "!g[Builder Knife] !nAi ales !gWarHammer Skull");
}

}

menu_destroy (menu);
return 1;
}

public CurentWeapon(id) {
if(get_user_weapon(id) == CSW_KNIFE) {

if(Knife1[id])
set_pev(id, pev_viewmodel2, Knife1Model);

if(Knife2[id])
set_pev(id, pev_viewmodel2, Knife2Model);

if(Knife3[id])
set_pev(id, pev_viewmodel2, Knife3Model);

if(Knife4[id])
set_pev(id, pev_viewmodel2, Knife4Model);

if(Knife5[id])
set_pev(id, pev_viewmodel2, Knife5Model);

if(KnifeGold1[id])
set_pev(id, pev_viewmodel2, KnifeGold1Model);

if(KnifeGold2[id])
set_pev(id, pev_viewmodel2, KnifeGold2Model);

if(KnifeGold3[id])
set_pev(id, pev_viewmodel2, KnifeGold3Model);

if(KnifeGold4[id])
set_pev(id, pev_viewmodel2, KnifeGold4Model);

if(KnifeGold5[id])
set_pev(id, pev_viewmodel2, KnifeGold5Model);

if(KnifeGold6[id])
set_pev(id, pev_viewmodel2, KnifeGold6Model);

if(KnifeGold7[id])
set_pev(id, pev_viewmodel2, KnifeGold7Model);

if(KnifeGold8[id])
set_pev(id, pev_viewmodel2, KnifeGold8Model);
}
}


public DamageKnife ( Victim, Inflictor, Attacker, Float:fDamage ) {
if(is_user_connected(Attacker) && Attacker != Victim) {
if(get_user_weapon(Attacker) == CSW_KNIFE) {

if(Knife1[Attacker])
SetHamParamFloat(4, fDamage * 2.0);

if(Knife2[Attacker])
SetHamParamFloat(4, fDamage * 2.0);

if(Knife3[Attacker])
SetHamParamFloat(4, fDamage * 2.0);

if(Knife4[Attacker])
SetHamParamFloat(4, fDamage * 2.0);

if(Knife5[Attacker])
SetHamParamFloat(4, fDamage * 2.0);

if(KnifeGold1[Attacker])
SetHamParamFloat(4, fDamage * 3.0);

if(KnifeGold2[Attacker])
SetHamParamFloat(4, fDamage * 3.0);

if(KnifeGold3[Attacker])
SetHamParamFloat(4, fDamage * 3.0);

if(KnifeGold4[Attacker])
SetHamParamFloat(4, fDamage * 3.0);

if(KnifeGold5[Attacker])
SetHamParamFloat(4, fDamage * 4.0);

if(KnifeGold6[Attacker])
SetHamParamFloat(4, fDamage * 4.0);

if(KnifeGold7[Attacker])
SetHamParamFloat(4, fDamage * 6.0);

if(KnifeGold8[Attacker])
SetHamParamFloat(4, fDamage * 6.0);

}
}
}

public SayKnife(id) {
if(KnifeChoosen[id]) {
ChatColor(id, "!g[Builder Knife] !nAti ales deja un cutit īn aceasta runda");
return;
}

if(cs_get_user_team(id) == CS_TEAM_CT) {
MenuKnife(id);
}
}

stock ChatColor(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "!g", "^4"); // verde
replace_all(msg, 190, "!n", "^1"); // galben/alb/negru
replace_all(msg, 190, "!t", "^3"); // rosu/albastru/gri
replace_all(msg, 190, "!t2", "^0"); // rosu2/albastru2/gri2

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();
}
}
}
}
Raul3w is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-03-2017 , 07:49   Re: Bad Load Plugin
Reply With Quote #2

Good job.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-03-2017 , 07:52   Re: Bad Load Plugin
Reply With Quote #3

Good work.
//if created by you so you can also get fixet by you (Ripper) -_-
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 06-03-2017 , 07:54   Re: Bad Load Plugin
Reply With Quote #4

romanian
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-03-2017 , 12:44   Re: Bad Load Plugin
Reply With Quote #5

Hhhh I Think You're Lieing
Houssam Benmouna is offline
Reply



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

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

Forum Jump


All times are GMT -4. The time now is 02:50.


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