User
Pass
2FA
 
 

Problema VIP Deathrun

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message1100
licensse

[Mentally Stable]



Status: Offline
(since 22-05-2020 20:07)
Joined: 31 Jul 2018
Posts: 70, Topics: 28
Location: Moldova, Republic of

Reputation: -24.6
Votes: 1

Post Posted: 06-08-2018, 19:02:20 | Translate post to: ... (Click for more languages)

Salut am gasit addons asta si arata foarte bine :https://www.extreamcs.com/forum/addon-uri/addons-deathrun-2k17-t333924.html
Dar are o problema cu vip nu este activat sau nustiu ce are nu merge /vmenu sau /powers asa zice in sma ca sunt comenzile uitati sma:

Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Vip wIN"
#define VERSION "1.0"
#define AUTHOR "c0stY*"



new gfi_WorkFile[ 128 ];
new gs_VipsList[ 128 ][ 32 ], gi_TotalLines;
new gi_IsUserVip[ 33 ];
new g_pVisiblity;

new const gs_VipsFile[ ] = "vips.ini";

enum
{
   Primary = 1
   , Secondary
   , Knife
   , Grenades
   , C4
};

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   register_clcmd("say /vmenu", "Powermenu", ADMIN_LEVEL_H,"")
   register_clcmd( "say /powers","Powermenu", ADMIN_LEVEL_H,"")
 
        g_pVisiblity = register_cvar( "km_invis", "150" ); // 255 = vizibil total

}



public plugin_cfg ( )
{
   new fi_Dir[ 64 ];
   get_configsdir ( fi_Dir, charsmax ( fi_Dir ) );
   formatex ( gfi_WorkFile, charsmax ( gfi_WorkFile ), "%s/%s", fi_Dir, gs_VipsFile );
   
   if ( ! file_exists ( gfi_WorkFile ) )
      write_file ( gfi_WorkFile, "; *VIP List*" );
   
   new s_Buffer[ 192 ], i_Line, i_Len;
   while ( ( i_Line = read_file ( gfi_WorkFile, i_Line, s_Buffer, charsmax ( s_Buffer ), i_Len ) ) )
   {
      if ( ! strlen ( s_Buffer ) || s_Buffer[ 0 ] == ';' || ( s_Buffer[ 0 ] == '/' && s_Buffer[ 1 ] == '/' ) )
         continue;
         
      copy ( gs_VipsList[ gi_TotalLines++ ], 32, s_Buffer );

   }
}


public client_putinserver ( id ) gi_IsUserVip[ id ] = 0;
public client_disconnect ( id ) gi_IsUserVip[ id ] = 0;

public Powermenu( id )
 {
    if ( ! is_user_alive ( id ) )
      return PLUGIN_HANDLED
    if ( ! is_user_vip ( id ) )
    {
      gi_IsUserVip[ id ] = 0;
      return PLUGIN_HANDLED
    }
   
    gi_IsUserVip[ id ] = 1;
   
    new menu = menu_create( "\rPowers Menu:", "menu_handler" );
   

   
    menu_additem( menu, "\w[Dr]\yViata.", "1", 0 )
    menu_additem( menu, "\w[Dr]\yViteza.", "2", 0 )
    menu_additem( menu, "\w[Dr]\yGravitate.", "3",0 )
    menu_additem( menu, "\w[Dr]\yAk47 +\rM4a1 + \yDeagle", "4",0 )
    menu_additem( menu, "\w[Dr]\yRifles \r[\rArme \ytari].", "5",0 )
    menu_additem( menu, "\w[Dr]\yShiels.", "6",0 )
    menu_additem( menu, "\w[Dr]\yPachet grenazi.", "7",0 )
    menu_additem( menu, "\w[Dr]\yMachine Guns \r[5.9]", "8",0 )
    menu_additem( menu, "\w[Dr]\yViteza normala.", "9",0 )
    menu_additem( menu, "\w[Dr]\yArmura." , "10",0)

    menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
    menu_display( id, menu, 0 );
   
    return PLUGIN_HANDLED   
 }

public menu_handler( id, menu, item )
 {
   
    switch( item )
    {
        case 0:
        {
      set_user_health(id,800)
       
        }
        case 1:
        {
                set_pev( id,pev_maxspeed, 1200.0)
                set_user_maxspeed(id,1200.0)      
                client_cmd(id,"cl_forwardspeed 1200.0")
                client_cmd(id,"cl_backspeed 1200.0")               
                client_cmd(id,"cl_sidespeed 1200.0")
        }
        case 2:
        {
                set_pev( id, pev_gravity, 0.3125);
      
        }
        case 3:
        {

      give_item(id,"weapon_ak47")
      cs_set_user_bpammo(id, CSW_AK47, 250);
      give_item(id,"weapon_m4a1")
      cs_set_user_bpammo(id, CSW_M4A1, 250 );
      give_item(id,"weapon_deagle")
      cs_set_user_bpammo(id, CSW_DEAGLE, 250 );
        }
        case 4:
        {
      give_item(id,"weapon_ak47")
      cs_set_user_bpammo(id, CSW_AK47, 250);
      give_item(id,"weapon_m4a1")
      cs_set_user_bpammo(id, CSW_M4A1, 250 );
      give_item(id,"weapon_deagle")
      cs_set_user_bpammo(id, CSW_DEAGLE, 250 );
                give_item(id,"weapon_famas")
                cs_set_user_bpammo(id, CSW_FAMAS, 250 );
      give_item(id,"weapon_awp")
      cs_set_user_bpammo(id, CSW_AWP, 250 );
      give_item(id,"weapon_mp5navy")
      cs_set_user_bpammo(id, CSW_MP5NAVY, 250 );
      give_item(id,"weapon_ump45")
      cs_set_user_bpammo(id, CSW_UMP45, 250 );
      give_item(id,"weapon_galil")
      cs_set_user_bpammo(id, CSW_GALIL, 250 );
      give_item(id,"weapon_scout")
      cs_set_user_bpammo(id, CSW_SCOUT, 250 );
      give_item(id,"weapon_aug")
      cs_set_user_bpammo(id, CSW_AUG, 250 );
      give_item(id,"weapon_sg550")
      cs_set_user_bpammo(id, CSW_SG550, 250 );
        }
        case 5:
        {
      StripWeapons(id, Primary)
      give_item(id,"weapon_shield")

      
        }
        case 6:
        {
      give_item(id, "weapon_hegrenade")
                cs_set_user_bpammo(id, CSW_HEGRENADE, 8 );
      give_item(id, "weapon_flashbang")
      give_item(id, "weapon_flashbang")
      give_item(id, "weapon_smokegrenade")
                cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 8 );
        }
        case 7:
        {
      give_item(id,"weapon_m249")
      cs_set_user_bpammo(id, CSW_M249, 300 );
               
        }
        case 8:
        {
      set_pev( id,pev_maxspeed, 350.0)
                set_user_maxspeed(id,350.0)      
                client_cmd(id,"cl_forwardspeed 350.0")             
                client_cmd(id,"cl_backspeed 350.0")           
                client_cmd(id,"cl_sidespeed 350.0")
        }
        case 9:
        {
      set_user_armor(id,800)
                set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, get_pcvar_num( g_pVisiblity ) );
        }
    }


    menu_destroy( menu );
    return PLUGIN_HANDLED;
}
 

public showAdmin(id)
{   
      new num, iLen, admin
      static pl[32], name[32], szBuff[2048]
   
      get_players(pl, num, "c")
   
      for(new i = 0; i < num; i++)
      {
         if (  is_user_vip ( pl[i] ) )
         {
         gi_IsUserVip[ pl[i] ] = 1;
         get_user_name(pl[i], name, 31)
         iLen += format(szBuff[iLen], 2048 - iLen, "%d. %s^n", admin + 1, name)
         admin++
         }
         
      }

   
      set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 6.0, 7.0 )
      show_hudmessage(id, " %s online:^n%s", admin > 1 ? "Vips" : "Vips", szBuff)
   
      arrayset(szBuff, 0, 2048)
   
      return PLUGIN_HANDLED
}

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

stock is_user_vip ( id )
{
   new s_Name[ 32 ], s_AuthID[ 32 ];
   get_user_name ( id, s_Name, 31 );
   get_user_authid ( id, s_AuthID, 31 );
   
   for ( new i; i < gi_TotalLines; i++ )
   {
      if ( ! strcmp ( s_Name, gs_VipsList[ i ] ) )
         return 1;
      if ( ! strcmp ( s_AuthID, gs_VipsList[ i ] ) )
         return 1;
   }
   
   return 0;

}

stock StripWeapons(id, Type, bool: bSwitchIfActive = true)
{
   new iReturn;
   
   if(is_user_alive(id))
   {
      new iEntity, iWeapon;
      while((iWeapon = GetWeaponFromSlot(id, Type, iEntity)) > 0)
         iReturn = ham_strip_user_weapon(id, iWeapon, Type, bSwitchIfActive);
   }
   
   return iReturn;
}

stock GetWeaponFromSlot( id , iSlot , &iEntity )
{
   if ( !( 1 <= iSlot <= 5 ) )
      return 0;
   
   iEntity = 0;
   const m_rgpPlayerItems_Slot0 = 367;
   const m_iId = 43;
   const XO_WEAPONS = 4;
   const XO_PLAYER = 5;
      
   iEntity = get_pdata_cbase( id , m_rgpPlayerItems_Slot0 + iSlot , XO_PLAYER );
   
   return ( iEntity > 0 ) ? get_pdata_int( iEntity , m_iId , XO_WEAPONS ) : 0;


stock ham_strip_user_weapon(id, iCswId, iSlot = 0, bool:bSwitchIfActive = true)
{
   new iWeapon
   if( !iSlot )
   {
      static const iWeaponsSlots[] = {
         -1,
         2, //CSW_P228
         -1,
         1, //CSW_SCOUT
         4, //CSW_HEGRENADE
         1, //CSW_XM1014
         5, //CSW_C4
         1, //CSW_MAC10
         1, //CSW_AUG
         4, //CSW_SMOKEGRENADE
         2, //CSW_ELITE
         2, //CSW_FIVESEVEN
         1, //CSW_UMP45
         1, //CSW_SG550
         1, //CSW_GALIL
         1, //CSW_FAMAS
         2, //CSW_USP
         2, //CSW_GLOCK18
         1, //CSW_AWP
         1, //CSW_MP5NAVY
         1, //CSW_M249
         1, //CSW_M3
         1, //CSW_M4A1
         1, //CSW_TMP
         1, //CSW_G3SG1
         4, //CSW_FLASHBANG
         2, //CSW_DEAGLE
         1, //CSW_SG552
         1, //CSW_AK47
         3, //CSW_KNIFE
         1, //CSW_P90
                        1  //CSW_SHIELD
      }
      iSlot = iWeaponsSlots[iCswId]
   }

   const XTRA_OFS_PLAYER = 5
   const m_rgpPlayerItems_Slot0 = 367

   iWeapon = get_pdata_cbase(id, m_rgpPlayerItems_Slot0 + iSlot, XTRA_OFS_PLAYER)

   const XTRA_OFS_WEAPON = 4
   const m_pNext = 42
   const m_iId = 43

   while( iWeapon > 0 )
   {
      if( get_pdata_int(iWeapon, m_iId, XTRA_OFS_WEAPON) == iCswId )
      {
         break
      }
      iWeapon = get_pdata_cbase(iWeapon, m_pNext, XTRA_OFS_WEAPON)
   }

   if( iWeapon > 0 )
   {
      const m_pActiveItem = 373
      if( bSwitchIfActive && get_pdata_cbase(id, m_pActiveItem, XTRA_OFS_PLAYER) == iWeapon )
      {
         ExecuteHamB(Ham_Weapon_RetireWeapon, iWeapon)
      }

      if( ExecuteHamB(Ham_RemovePlayerItem, id, iWeapon) )
      {
         user_has_weapon(id, iCswId, 0)
         ExecuteHamB(Ham_Item_Kill, iWeapon)
         return 1
      }
   }

   return 0
}
[/b]

0 0
  
Back to top
View user's profile Send private message
InLoveCs

[00 11 00]



Status: Offline
(since 24-12-2021 07:55)
Joined: 11 Jan 2011
Posts: 8224, Topics: 738
Location: zmx.freakz.ro

Reputation: 2926.8
Votes: 170

     
Post Posted: 07-08-2018, 10:18:45 | Translate post to: ... (Click for more languages)

Incearca asta :

Spoiler:


sau asta : https://forums.alliedmods.net/showthread.php?t=159675

0 0
  
Back to top
View user's profile Send private message
licensse

[Mentally Stable]



Status: Offline
(since 22-05-2020 20:07)
Joined: 31 Jul 2018
Posts: 70, Topics: 28
Location: Moldova, Republic of

Reputation: -24.6
Votes: 1

Post Posted: 07-08-2018, 10:40:56 | Translate post to: ... (Click for more languages)

InLoveCs wrote:
Incearca asta :

Spoiler:


sau asta : https://forums.alliedmods.net/showthread.php?t=159675


Al tau care mi l-ai dat imi place foarte mult dar am nevoie si de Health,Gravity si Speed in meniu de la /vmenu te rog daca poti sa bagi.

0 0
  
Back to top
View user's profile Send private message
licensse

[Mentally Stable]



Status: Offline
(since 22-05-2020 20:07)
Joined: 31 Jul 2018
Posts: 70, Topics: 28
Location: Moldova, Republic of

Reputation: -24.6
Votes: 1

Post Posted: 07-08-2018, 11:25:32 | Translate post to: ... (Click for more languages)

InLoveCs wrote:
Incearca asta :

Spoiler:


sau asta : https://forums.alliedmods.net/showthread.php?t=159675


Nu merge imi zice ca eu nu sunt un membru VIP dar eu am toate flagurile inclusiv si cel "h" care zice mai sus

0 0
  
Back to top
View user's profile Send private message
InLoveCs

[00 11 00]



Status: Offline
(since 24-12-2021 07:55)
Joined: 11 Jan 2011
Posts: 8224, Topics: 738
Location: zmx.freakz.ro

Reputation: 2926.8
Votes: 170

     
Post Posted: 07-08-2018, 11:29:13 | Translate post to: ... (Click for more languages)

ADMIN_LEVEL_H consta in flagul "t" nu in "h".
0 0
  
Back to top
View user's profile Send private message
licensse

[Mentally Stable]



Status: Offline
(since 22-05-2020 20:07)
Joined: 31 Jul 2018
Posts: 70, Topics: 28
Location: Moldova, Republic of

Reputation: -24.6
Votes: 1

Post Posted: 07-08-2018, 11:43:34 | Translate post to: ... (Click for more languages)

InLoveCs wrote:
ADMIN_LEVEL_H consta in flagul "t" nu in "h".


Am si flagul "t" si tot imi zice ca nu sunt VIP.

Update @ 07-08-2018, 12:43:34

InLoveCs wrote:
ADMIN_LEVEL_H consta in flagul "t" nu in "h".


Sa stii ca am dat si restart tot dar nu merge nustiu de ce

0 0
  
Back to top
View user's profile Send private message
licensse

[Mentally Stable]



Status: Offline
(since 22-05-2020 20:07)
Joined: 31 Jul 2018
Posts: 70, Topics: 28
Location: Moldova, Republic of

Reputation: -24.6
Votes: 1

Post Posted: 07-08-2018, 14:51:17 | Translate post to: ... (Click for more languages)

Rezolvat
0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by InLoveCs, 08 August 2018 08:28



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 08-05-2024, 03:41:07
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x