[CSGO] Deathrun Knife Menu

Descărcări de pluginuri și discuții despre acestea.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
SupaHotFire
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 224
Joined: 03 Oct 2016, 19:59
Detinator Steam: Da
Reputatie: Utilizator neserios ( tepar )
Fond eXtream: 0

13 Dec 2016, 14:31

Descarcare:[/u]
ZippyShare | GirlShare | MEGA
| Afiseaza codul
#include <sourcemod>
#include <sdktools>
#include <sdktools_sound>
#include <cstrike>
#include <sdkhooks>
#include <clientprefs>

#pragma semicolon 1

#define VERSION "1.0"

public Plugin:myinfo =
{
    name = "Deathrun Knife",
    author = "shoc^",
    description = "Deathrun Knife menu",
    version = VERSION,
    url = "www.extreamcs.com"
};

public OnPluginStart()
{
    LoadTranslations("common.phrases");

    RegConsoleCmd("sm_knife", KnifeMenu);
    RegConsoleCmd("buy", KnifeMenu);
    RegConsoleCmd("buymenu", KnifeMenu);
    RegConsoleCmd("autobuy", KnifeMenu);
    RegConsoleCmd("rebuy", KnifeMenu);

    // ======================================================================

    HookEvent( "player_spawn", OnPlayerSpawn );

}

public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId( GetEventInt( event, "userid" ));
    if ( IsValidPlayer( client ))
    {
        if(GetClientTeam(client) == CS_TEAM_CT)
        {
            new iWeapon = GetPlayerWeaponSlot(client, 2);
            PrintToChat(client, "\x05[Knife]\x01You spawned with the Default Knife.");
            SetEntityGravity(client, 1.0);
            SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
            RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
            new knife = GivePlayerItem(client, "weapon_bayonet");
            EquipPlayerWeapon(client, knife);
            KCM(client);
        }
    }
}

public Action:KnifeMenu(client,args)
{
    if(client == 0)
    {
        PrintToServer("%t","Command is in-game only");
        return Plugin_Handled;
    }
    else if ( IsPlayerAlive( client ))
    {
        if(GetClientTeam(client) == CS_TEAM_CT)
        {
            KCM(client);
        }
    }
    else
    {
        PrintToChat(client, "\x05[Knife]\x01You can't choose Knife.");
    }
    return Plugin_Handled;
}

public Action:KCM(clientId) 
{
    new Handle:menu = CreateMenu(KCMenuHandler);
    SetMenuTitle(menu, "Deathrun - Knife Menu");
    AddMenuItem(menu, "option1", "Default [Normal]");
    AddMenuItem(menu, "option2", "Butcher [Low Gravity]");
    AddMenuItem(menu, "option3", "Pocket [High Speed]");
    AddMenuItem(menu, "option4", "VIP [Only vips]");
    SetMenuExitButton(menu, true);
    DisplayMenu(menu, clientId, MENU_TIME_FOREVER);

    return Plugin_Handled;
}

public KCMenuHandler(Handle:menu, MenuAction:action, client, itemNum) 
{
    if ( action == MenuAction_Select ) 
    {
        new String:info[32];
        new iWeapon = GetPlayerWeaponSlot(client, 2);
        GetMenuItem(menu, itemNum, info, sizeof(info));

        if ( strcmp(info,"option1") == 0 ) 
        {
            {
              PrintToChat(client, "\x05[Knife]\x01You now have Default Knife.");
              SetEntityGravity(client, 1.0);
              SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
              RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
              new knife = GivePlayerItem(client, "weapon_bayonet");
              EquipPlayerWeapon(client, knife);
            }
        }
        else if ( strcmp(info,"option2") == 0 ) 
        {
            {
              PrintToChat(client, "\x05[Knife]\x01You now have Butcher Knife.");
              SetEntityGravity(client, 0.6);
              SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
              RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
              new knife = GivePlayerItem(client, "weapon_knife_gut");
              EquipPlayerWeapon(client, knife);
            }
        }
        else if ( strcmp(info,"option3") == 0 ) 
        {
            {
              PrintToChat(client, "\x05[Knife]\x01You now have Pocket Knife.");
              SetEntityGravity(client, 1.0);
              SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.3);
              RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
              new knife = GivePlayerItem(client, "weapon_knife_flip");
              EquipPlayerWeapon(client, knife);
            }
        }
        else if ( strcmp(info,"option4") == 0 ) 
        {
            {
              if (IsPlayerVip(client))
			  {
               PrintToChat(client, "\x05[Knife]\x01You now have VIP Knife.");
               SetEntityGravity(client, 0.8);
               SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.1);
               RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
               new knife = GivePlayerItem(client, "weapon_knife_karambit");
               EquipPlayerWeapon(client, knife);
			  }
			  else
			  {
			   PrintToChat(client, "\x05[Knife]\x01 You are not VIP.");
			   KCM(client);
			  }
            }
        }
    }
}

public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
  new client = GetClientOfUserId(GetEventInt(event, "userid"));

  if (GetClientTeam(client) == 1 && !IsPlayerAlive(client))
  {
         return;
  }
}

bool:IsPlayerVip(client)
{
	return CheckCommandAccess(client, "flag_vip", ADMFLAG_CUSTOM1, false);
}

bool:IsValidPlayer( client )
{
    if ( client < 1 || client > MaxClients )  return false;
    if ( !IsClientConnected( client ))  return false;
    if ( !IsClientInGame( client ))  return false;
    if ( IsFakeClient( client ))  return false;
    return true;
}

Nume: Deathrun Knife Menu
Autor: shoc^
Credite: mado, ma ajutat cu unele errori

Descriere: Acesta este un plugin de knife menu, asemanator cu cel din counter strike 1.6
* Default [Normal] (Bayoneta)
* Butcher [Low Gravity] (Gut)
* Pocket [High Speed] (Flip)
* VIP [Only vips] (Karambit)

Comenzi: !knife

Cvar-uri: nu exista.

Instalare:
1. Fisierul deathrun_knife.sp se adauga in addons/sourcemod/scripting
2. Fisierul deathrun_knife.smx se adauga in addons/sourcemod/plugins

ATENTIE !!!
Pentru a modifica flagul de VIP, editati aceasta parte a sursei.

bool:IsPlayerVip(client)
{
return CheckCommandAccess(client, "flag_vip", ADMFLAG_CUSTOM1, false);
}
RoyalServer 2
User avatar
mcristian
Membru, skill +3
Membru, skill +3
Posts: 1418
Joined: 30 Jul 2012, 20:24
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (2 luni)
Has thanked: 240 times
Been thanked: 59 times

14 Dec 2016, 09:56

Si nu iti baneaza Valve token'ul cu acest plugin?
exy wrote:Semifinalele si finala mica se vor juca maine (23.08).
Finala mica:

Code: Select all

tbd V tbd ora 22:00 bo3
exy wrote:
Specii. wrote:Frumos,in finala mica joaca tbd singur.
tbd = to be decided
Trebuie sa-ti traduc si to be decided ce inseamna ? :thinking:
User avatar
SupaHotFire
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 224
Joined: 03 Oct 2016, 19:59
Detinator Steam: Da
Reputatie: Utilizator neserios ( tepar )
Fond eXtream: 0

14 Dec 2016, 16:53

mcristian wrote:Si nu iti baneaza Valve token'ul cu acest plugin?
ba da vei primi ban token deoarece pluginul foloseste cutitele din csgo, daca doresti iti pot lasa aici o versiune fara skinuri pe cutite.
User avatar
Seve
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 555
Joined: 18 Aug 2012, 11:19
Detinator Steam: Da
Detinator server CS: GO.PLAYSIBIU.COM
SteamID: sevecsgo
Reputatie: Membru Club eXtreamCS (1 luna)
Utilizator neserios (tepar)
Has thanked: 83 times
Been thanked: 39 times
Contact:

14 Dec 2016, 19:16

SupaHotFire wrote:
mcristian wrote:Si nu iti baneaza Valve token'ul cu acest plugin?
ba da vei primi ban token deoarece pluginul foloseste cutitele din csgo, daca doresti iti pot lasa aici o versiune fara skinuri pe cutite.
Poti sa lasi.
Va astept pe Go.PlaySibiu.Com [RO/128 tickrate]
Image
User avatar
SupaHotFire
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 224
Joined: 03 Oct 2016, 19:59
Detinator Steam: Da
Reputatie: Utilizator neserios ( tepar )
Fond eXtream: 0

14 Dec 2016, 19:46

Seve wrote:
SupaHotFire wrote:
mcristian wrote:Si nu iti baneaza Valve token'ul cu acest plugin?
ba da vei primi ban token deoarece pluginul foloseste cutitele din csgo, daca doresti iti pot lasa aici o versiune fara skinuri pe cutite.
Poti sa lasi.
poftim :doge:
| Afiseaza codul
#include <sourcemod>
#include <sdktools>
#include <sdktools_sound>
#include <cstrike>
#include <sdkhooks>
#include <clientprefs>

#pragma semicolon 1

#define VERSION "1.0"

public Plugin:myinfo =
{
    name = "Deathrun Knife",
    author = "shoc^",
    description = "Deathrun Knife menu",
    version = VERSION,
    url = "www.extreamcs.com"
};

public OnPluginStart()
{
    LoadTranslations("common.phrases");

    RegConsoleCmd("sm_knife", KnifeMenu);
    RegConsoleCmd("buy", KnifeMenu);
    RegConsoleCmd("buymenu", KnifeMenu);
    RegConsoleCmd("autobuy", KnifeMenu);
    RegConsoleCmd("rebuy", KnifeMenu);

    // ======================================================================

    HookEvent( "player_spawn", OnPlayerSpawn );

}

public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId( GetEventInt( event, "userid" ));
    if ( IsValidPlayer( client ))
    {
        if(GetClientTeam(client) == CS_TEAM_CT)
        {
            new iWeapon = GetPlayerWeaponSlot(client, 2);
            PrintToChat(client, "\x05[Knife]\x01You spawned with the Default Knife.");
            SetEntityGravity(client, 1.0);
            SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
            RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
            new knife = GivePlayerItem(client, "weapon_knife");
            EquipPlayerWeapon(client, knife);
            KCM(client);
        }
    }
}

public Action:KnifeMenu(client,args)
{
    if(client == 0)
    {
        PrintToServer("%t","Command is in-game only");
        return Plugin_Handled;
    }
    else if ( IsPlayerAlive( client ))
    {
        if(GetClientTeam(client) == CS_TEAM_CT)
        {
            KCM(client);
        }
    }
    else
    {
        PrintToChat(client, "\x05[Knife]\x01You can't choose Knife.");
    }
    return Plugin_Handled;
}

public Action:KCM(clientId) 
{
    new Handle:menu = CreateMenu(KCMenuHandler);
    SetMenuTitle(menu, "Deathrun - Knife Menu");
    AddMenuItem(menu, "option1", "Default [Normal]");
    AddMenuItem(menu, "option2", "Butcher [Low Gravity]");
    AddMenuItem(menu, "option3", "Pocket [High Speed]");
    AddMenuItem(menu, "option4", "VIP [Only vips]");
    SetMenuExitButton(menu, true);
    DisplayMenu(menu, clientId, MENU_TIME_FOREVER);

    return Plugin_Handled;
}

public KCMenuHandler(Handle:menu, MenuAction:action, client, itemNum) 
{
    if ( action == MenuAction_Select ) 
    {
        new String:info[32];
        new iWeapon = GetPlayerWeaponSlot(client, 2);
        GetMenuItem(menu, itemNum, info, sizeof(info));

        if ( strcmp(info,"option1") == 0 ) 
        {
            {
              PrintToChat(client, "\x05[Knife]\x01You now have Default Knife.");
              SetEntityGravity(client, 1.0);
              SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
              RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
              new knife = GivePlayerItem(client, "weapon_knife");
              EquipPlayerWeapon(client, knife);
            }
        }
        else if ( strcmp(info,"option2") == 0 ) 
        {
            {
              PrintToChat(client, "\x05[Knife]\x01You now have Butcher Knife.");
              SetEntityGravity(client, 0.6);
              SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
              RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
              new knife = GivePlayerItem(client, "weapon_knife");
              EquipPlayerWeapon(client, knife);
            }
        }
        else if ( strcmp(info,"option3") == 0 ) 
        {
            {
              PrintToChat(client, "\x05[Knife]\x01You now have Pocket Knife.");
              SetEntityGravity(client, 1.0);
              SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.3);
              RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
              new knife = GivePlayerItem(client, "weapon_knife");
              EquipPlayerWeapon(client, knife);
            }
        }
        else if ( strcmp(info,"option4") == 0 ) 
        {
            {
              if (IsPlayerVip(client))
			  {
               PrintToChat(client, "\x05[Knife]\x01You now have VIP Knife.");
               SetEntityGravity(client, 0.8);
               SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.1);
               RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon);
               new knife = GivePlayerItem(client, "weapon_knife");
               EquipPlayerWeapon(client, knife);
			  }
			  else
			  {
			   PrintToChat(client, "\x05[Knife]\x01 You are not VIP.");
			   KCM(client);
			  }
            }
        }
    }
}

public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
  new client = GetClientOfUserId(GetEventInt(event, "userid"));

  if (GetClientTeam(client) == 1 && !IsPlayerAlive(client))
  {
         return;
  }
}

bool:IsPlayerVip(client)
{
	return CheckCommandAccess(client, "flag_vip", ADMFLAG_CUSTOM1, false);
}

bool:IsValidPlayer( client )
{
    if ( client < 1 || client > MaxClients )  return false;
    if ( !IsClientConnected( client ))  return false;
    if ( !IsClientInGame( client ))  return false;
    if ( IsFakeClient( client ))  return false;
    return true;
}
Post Reply

Return to “Pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests