Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSRequest Multi Jump


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hi, I have this shop.
Can someone add Multi jump only to CT to it cus I cant.

PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>
#include <colorchat>

#define PLUGIN "Jail Break Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szPrefix[] = "[SHOP]"
new const sk_model[66] = "models/v_super_knife.mdl"

new bool:SK[32];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /shop""shop")
    
register_clcmd("say_team /shop""shop")
    
register_clcmd("say shop""shop")
    
register_clcmd("say_team shop""shop")
    
register_concmd("shop""shop")
    
    
register_event("CurWeapon""CurWeap""be""1=1");
    
RegisterHam(Ham_TakeDamage"player""SK_Damage");
}
public 
plugin_precache()
{
    
precache_model(sk_model)
}
public 
client_putinserver(id)
{
    
SK[id] = false
}
public 
client_disconnect(id)
{
    
client_putinserver(id)
}
public 
shop(id)
{
    if(
get_user_team(id) == 1)
    {
        
shop_te(id)
    }
    if(
get_user_team(id) == 2)
    {
        
shop_ct(id)
    }
    if(!
is_user_alive(id))
    {
        
ColorChat(idGREEN"%s^x03 Nu poti folosi shop-l cand esti mort !"szPrefix)
        return 
1
    
}
    return 
1
}
public 
shop_te(id)
{
    new 
menu menu_create("\yFurien Shop""give_te")
    
    
menu_additem(menu"Super Knife        \y$10000""1"0)
    
menu_additem(menu"He Grenade        \y$3000""2"0)
    
menu_additem(menu"50 HP        \y$3000""3"0)
    
menu_additem(menu"50 AP + Halmet    \y$500""4"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
}
public 
shop_ct(id)
{
    new 
menu menu_create("\yAnti-Furien Shop""give_ct")
    
    
menu_additem(menu"He Grenade        \y$6000""1"0)
    
menu_additem(menu"Defuse Kit        \y$500""2"0)
    
menu_additem(menu"50 HP        \y$3000""3"0)
    
menu_additem(menu"50 AP + Halmet    \y$500""4"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
}
public 
give_te(iditemmenu)
{
    if(
item == MEXIT_ALL)
    {
        return 
1;
    }
    new 
iMoney cs_get_user_money(id)
    new 
accesscallbackdata[6], szName[64];
    
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data)
    
    switch(
key)
    {
        case 
1:
        {
            if(
iMoney 10000)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 Super Knife^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 10000)
                
SK[id] = true;
                
CurWeap(id)
                return 
1;
            }
        }
        case 
2:
        {
            if(
iMoney  3000)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 He Grenade^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 3000)
                
give_item(id"weapon_hegrenade")
                return 
1;
            }
        }
        case 
3:
        {
            new 
iHealth get_user_health(id)
            if(
iMoney 3000)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 50 HP^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 3000)
                
set_user_health(idiHealth 50)
                if(
iHealth 200)
                {
                    
ColorChat(idGREEN"%s^x03 Nu mai poti cumpara Health , ai atins limita maxima !"szPrefix)
                    return 
1;
                }
                return 
1;
            }
        }
        case 
4:
        {
            new 
iArmor get_user_armor(id)
            if(
iMoney 500)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 50 AP^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 500)
                
set_user_armor(idiArmor 50)
                
give_item(id"item_assaultsuit");
                if(
iArmor 500)
                {
                    
ColorChat(idGREEN"%s^x03 Nu mai poti cumpara Armor , ai atins limita maxima !"szPrefix)
                    return 
1;
                }    
                return 
1;
            }
        }
    }
    
menu_destroy(menu)
    return 
1;
}
public 
give_ct(iditemmenu)
{
    if(
item == MEXIT_ALL)
    {
        return 
1;
    }
    new 
iMoney cs_get_user_money(id)
    new 
accesscallbackdata[6], szName[64];
    
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data)
    
    switch(
key)
    {
        case 
1:
        {
            if(
iMoney 6000)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 He Grenade^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 6000)
                
give_item(id"weapon_hegrenade")
                return 
1;
            }
        }
        case 
2:
        {
            if(
iMoney 500)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 Defuse Kit^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 500)
                
give_item(id"item_thighpack")
                return 
1;
            }
        }
        case 
3:
        {
            new 
iHealth get_user_health(id)
            if(
iMoney 3000)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 50 HP^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 3000)
                
set_user_health(idiHealth 50)
                if(
iHealth 200)
                {
                    
ColorChat(idGREEN"%s^x03 Nu mai poti cumpara Health , ai atins limita maxima !"szPrefix)
                    return 
1;
                }
                return 
1;
            }
        }
        case 
4:
        {
            new 
iArmor get_user_armor(id)
            if(
iMoney 500)
            {
                
ColorChat(idGREEN"%s^x03 Nu poti cumpara acest item din lipsa de bani !"szPrefix)
                return 
1;
            }
            else
            {
                
ColorChat(idGREEN"%s^x03 Ai cumparat^x04 50 AP^x03 !"szPrefix)
                
cs_set_user_money(idiMoney 500)
                
set_user_armor(idiArmor 50)
                
give_item(id"item_assaultsuit");
                if(
iArmor 500)
                {
                    
ColorChat(idGREEN"%s^x03 Nu mai poti cumpara Armor , ai atins limita maxima !"szPrefix)
                    return 
1;
                }
                return 
1;
            }
        }
    }
    
menu_destroy(menu)
    return 
1;
}
public 
CurWeap(id)
{
    if(
get_user_weapon(id) == CSW_KNIFE && SK[id])
    {
        
set_pev(idpev_viewmodel2sk_model)
    }
}
public 
SK_Damage(iVictimiInflictoriAttackerFloat:fDamageiDamageBits)
{
    if(
get_user_weapon(iAttacker) == CSW_KNIFE && SK[iAttacker])
    {
        
SetHamParamFloat4fDamage 2.5);
        return 
HAM_HANDLED;
    }
    return 
HAM_IGNORED;


Multi Jump Plugin if u need this :
PHP Code:

/*    Formatright © 2009, ConnorMcLeod

    Multi Jumps is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Multi Jumps; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define ADMIN_MULTIJUMP ADMIN_RCON

#define VERSION "0.0.7"

#define MAX_PLAYERS 32

#define m_iTeam 114
#define m_afButtonPressed 246
#define m_flFallVelocity 251

new g_iJumpCount[MAX_PLAYERS+1]
new 
g_bMultiJump[MAX_PLAYERS+1 char]

new 
g_pCvarMultiJumpsg_pCvarTeamAllowedg_pCvarOnlyAdminsg_pCvarMaxFallVelocityg_pCvarJumpVelocity

public plugin_init()
{
    
register_plugin("Multi Jumps"VERSION"ConnorMcLeod")

    
g_pCvarMultiJumps register_cvar("mp_multijumps""1")
    
g_pCvarTeamAllowed register_cvar("mp_multijumps_team""3"//0:nobody, 1:terrorists, 2:cts, 3:all
    
g_pCvarOnlyAdmins register_cvar("mp_multijumps_adminonly""0")
    
g_pCvarMaxFallVelocity register_cvar("mp_multijump_maxfallvelocity""500")
    
g_pCvarJumpVelocity register_cvar("mp_multijumps_jumpvelocity""268.328157")

    
register_clcmd("say /mj""ClCmd_Say_MultiJump")
    
register_clcmd("say /multijump""ClCmd_Say_MultiJump")

    
RegisterHam(Ham_Player_Jump"player""OnCBasePlayer_Jump"false)
}

public 
client_putinserverid )
{
    
g_bMultiJumpid } = true
}

public 
ClCmd_Say_MultiJumpid )
{
    
client_print(idprint_chat" * MultiJumps : %sable", ( g_bMultiJumpid } = !g_bMultiJumpid } ) ? "en" "dis")
}

public 
OnCBasePlayer_Jump(id)
{
    if( !
g_bMultiJumpid } || !is_user_alive(id) )
    {
        return 
HAM_IGNORED
    
}

    new 
fFlags pev(idpev_flags)
    if(    
fFlags FL_WATERJUMP
    
||    pev(idpev_waterlevel) >= 2
    
||    !(get_pdata_int(idm_afButtonPressed) & IN_JUMP)    )
    {
        return 
HAM_IGNORED
    
}

    if(    
fFlags FL_ONGROUND    )
    {
        
g_iJumpCount[id] = 0
        
return HAM_IGNORED
    
}

    new 
iMulti get_pcvar_num(g_pCvarMultiJumps)

    if( 
iMulti )
    {
        if(    
get_pcvar_num(g_pCvarTeamAllowed) & get_pdata_int(idm_iTeam)
        ||    ( 
get_pcvar_num(g_pCvarOnlyAdmins) && get_user_flags(id) & ADMIN_MULTIJUMP )    )
        {
            if(    
get_pdata_float(idm_flFallVelocity) < get_pcvar_float(g_pCvarMaxFallVelocity)
            &&    ++
g_iJumpCount[id] <= iMulti    )
            {
                new 
Float:fVelocity[3]
                
pev(idpev_velocityfVelocity)
                
fVelocity[2] = get_pcvar_float(g_pCvarJumpVelocity)
                
set_pev(idpev_velocityfVelocity)
                return 
HAM_HANDLED
            
}
        }
    }

    return 
HAM_IGNORED


Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...