Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by Lolek ( 15 years ago )
[php]
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <xs>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define MAX_CLIENTS 32
#define FL_WATERJUMP (1<<11) // popping out of the water
#define FL_ONGROUND (1<<9) // not moving on the ground
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
const PRIMARY_WEAPONS_BITSUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)
const SECONDARY_WEAPONS_BITSUM = (1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)|(1<<CSW_P228)|(1<<CSW_USP)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)
const m_pPlayer = 41
const m_flNextPrimaryAttack = 46
const m_flNextSecondaryAttack = 47
const m_flTimeWeaponIdle = 48
new bool:g_bPlayerNonSpawnEvent[MAX_CLIENTS + 1]
new g_iFwFmClientCommandPost
new bool:silacz[33]
new bool:wybor[33]
new bool:skoczek[33]
new bool:g_norecoil[33]
new bool:g_upadly[33]
new bool:g_knock[33]
new bool:walczak[33]
new bool:g_ninja[33]
new g_iCurrentWeapon[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /klasa","klasy")
register_event("ResetHUD", "fwEvResetHUD", "b")
register_event("TextMsg", "fwEvGameWillRestartIn", "a", "2=#Game_will_restart_in")
register_clcmd("fullupdate", "fwCmdClFullupdate")
register_forward(FM_PlayerPreThink, "FM_PreThink")
RegisterHam(Ham_TakeDamage, "player", "Ham_PlayerTakeDamage", 0)
}
public fwEvResetHUD(iPlayerId) {
if (!is_user_alive(iPlayerId))
return
if (g_bPlayerNonSpawnEvent[iPlayerId]) {
g_bPlayerNonSpawnEvent[iPlayerId] = false
return
}
fwPlayerSpawn(iPlayerId)
}
public fwEvGameWillRestartIn() {
static iPlayers[32], iPlayersNum, i
get_players(iPlayers, iPlayersNum, "a")
for (i = 0; i < iPlayersNum; ++i)
g_bPlayerNonSpawnEvent[iPlayers[i]] = true
}
public fwCmdClFullupdate(iPlayerId) {
g_bPlayerNonSpawnEvent[iPlayerId] = true
static const szFwFmClientCommandPost[] = "fwFmClientCommandPost"
g_iFwFmClientCommandPost = register_forward(FM_ClientCommand, szFwFmClientCommandPost, 1)
return PLUGIN_CONTINUE
}
public fwFmClientCommandPost(iPlayerId) {
unregister_forward(FM_ClientCommand, g_iFwFmClientCommandPost, 1)
g_bPlayerNonSpawnEvent[iPlayerId] = false
return FMRES_HANDLED
}
public fwPlayerSpawn(iPlayerId) {
wybor[iPlayerId] = false
silacz[iPlayerId] = false
skoczek[iPlayerId] = false
g_norecoil[iPlayerId] = false
g_knock[iPlayerId] = false
g_upadly[iPlayerId] = false
silacz[iPlayerId] = false
walczak[iPlayerId] = false
g_ninja[iPlayerId] = false
set_user_rendering( iPlayerId, _, 0, 0, 0, _, 0 );
}
public FM_PreThink(id) {
if (is_user_alive(id) && g_norecoil[id])
set_pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0})
}
public client_PreThink(id)
{
if(!g_knock[id])
return PLUGIN_CONTINUE
entity_set_float(id, EV_FL_fuser2, 0.0)
if(!g_knock[id])
return PLUGIN_CONTINUE
if (entity_get_int(id, EV_INT_button) & 2) {
new flags = entity_get_int(id, EV_INT_flags)
if (flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
return PLUGIN_CONTINUE
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
velocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, velocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
return PLUGIN_CONTINUE
}
public Ham_PlayerTakeDamage(iVictim, iInflictor, iAttacker, Float:flDamage, iDmgBits)
{
if (iDmgBits & DMG_FALL)
{
if (g_upadly[iVictim] == true)
{
return HAM_SUPERCEDE
}
}
if(g_ninja[iAttacker] && g_iCurrentWeapon[iAttacker] == CSW_KNIFE)
{
SetHamParamFloat(4,flDamage*10.0)
return HAM_OVERRIDE
}
return HAM_IGNORED
}
public client_disconnect(id)
{
wybor[id] = false
silacz[id] = false
skoczek[id] = false
g_norecoil[id] = false
g_upadly[id] = false
g_knock[id] = false
silacz[id] = false
walczak[id] = false
g_ninja[id] = false
}
public client_putinserver(id)
{
wybor[id] = false
silacz[id] = false
skoczek[id] = false
g_norecoil[id] = false
g_upadly[id] = false
g_knock[id] = false
silacz[id] = false
walczak[id] = false
g_ninja[id] = false
set_user_rendering( id, _, 0, 0, 0, _, 0 );
}
public client_death(g_attacker, g_victim, wpnindex, hitplace, TK)
{
wybor[g_victim] = false
silacz[g_victim] = false
skoczek[g_victim] = false
g_norecoil[g_victim] = false
g_upadly[g_victim] = false
g_knock[g_victim] = false
silacz[g_victim] = false
walczak[g_victim] = false
g_ninja[g_victim] = false
set_user_rendering( g_victim, _, 0, 0, 0, _, 0 );
}
public klasy(id, menuid)
{
if (cs_get_user_team(id) == CS_TEAM_T)
{
client_print(id, print_chat, "[BB] Zombie nie moze wybrac klasy!")
return PLUGIN_HANDLED;
}
else if(wybor[id] == true)
{
client_print(id, print_chat, "[BB] Wybrales juz klase!")
return PLUGIN_HANDLED;
}
else
{
klasa(id)
}
return PLUGIN_CONTINUE;
}
public klasa(id)
{
new menu = menu_create("\rWybierz swoja klase:", "wybierzklase")
menu_additem(menu, "\wSilacz (+80 Zycia)", "1", 0)
menu_additem(menu, "\wSkoczek (Grawitacja ++)", "2", 0)
menu_additem(menu, "\wMrozny wojownik (Granaty Frost X 3)", "3", 0)
menu_additem(menu, "\wMocarz (No Recoil)", "4", 0)
menu_additem(menu, "\wUpadly (Nie traci HP za upadek)", "5", 0)
menu_additem(menu, "\wNiszczyciel (AutoBunnyHop)", "6", 0)
menu_additem(menu, "\wNinja (+ Niewidzialnosc+ Super Noz)", "7", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public wybierzklase(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:
{
wybor[id] = true
silacz[id] = true
set_user_gravity(id, 1.00)
new user_health = get_user_health(id)
fm_set_user_health(id, user_health + 80)
client_print(id, print_chat,"[BB] Twoja klasa to: Silacz (+80 Zycia)");
}
case 2:
{
wybor[id] = true
skoczek[id] = true
set_user_gravity(id, 0.70)
client_print(id, print_chat,"[BB] Twoja klasa to: Skoczek (Grawitacja jest mniejsza)");
}
case 3:
{
wybor[id] = true
walczak[id] = true
set_user_gravity(id, 1.00)
give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 3)
client_print(id, print_chat,"[BB] Twoja klasa to: Mrozny Walczak (Granaty Frost x3)");
}
case 4:
{
wybor[id] = true
g_norecoil[id] = true
client_print(id, print_chat,"[BB] Twoja klasa: Mocarz (No Recoil)")
}
case 5:
{
wybor[id] = true
g_upadly[id] = true
set_user_gravity(id, 1.00)
client_print(id, print_chat,"[BB] Twoja klasa to: Upadly (Nie traci HP za upadki)");
}
case 6:
{
wybor[id] = true
g_knock[id] = true
set_user_gravity(id, 1.00)
client_print(id, print_chat,"[BB] Twoja klasa to: Niszczyciel (Auto bunnyhop)");
}
case 7:
{
wybor[id] = true
g_ninja[id] = true
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,127)
client_print(id, print_chat,"[BB] Twoja klasa to: Niewidoczny wojownik (Niewidzialnosci + Pancerz)");
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
[/php]Could You help me with fixing the 10x dmg for class g_ninja??
Revise this Paste