AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   A delay and correct (https://forums.alliedmods.net/showthread.php?t=143086)

SeeC 11-14-2010 07:48

A delay and correct
 
Please correct my vip menu if it's not good. (I'm bad at English.) And please put a delay code after 16second of round start..

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <zombieplague.inc>

public plugin_init()
{
   
register_plugin("ZM VIP MENU""0.0.1""Q.das")

   
register_logevent("Round_Start"14"1=Round_Start")
   
register_menucmd(register_menuid("menu_rod"), 1023"Pressedrod")
}

public 
Round_Start()
{
   new 
players[32], pnum
   get_players
(playerspnum"a")

   for (new 
0pnumi++)
   {
      new 
player players[i]

      if (
get_user_flags(player) & ADMIN_LEVEL_H)
      {
         
ShowmenuID(player)
      }
   }

   return 
PLUGIN_HANDLED
}

public 
ShowmenuID(id)
{
   new 
Body[512]
   new 
CsTeams:iTeam cs_get_user_team(id)

   if (
iTeam == CS_TEAM_T)
   {
      
add(Body511"\rVIP Menu: \R\dZombie^n^n")
      
add(Body511"\r1. \w9000hp^n")
      
add(Body511"\r0. \wExit^n")
   }

   else if (
iTeam == CS_TEAM_CT)
   {
      
add(Body511"\rVIP Menu: \R\dSurviver^n^n")
      
add(Body511"\r1. \w+100 Sarvu^n")
      
add(Body511"\r2. \w+250 Gyvybiu^n")
      
add(Body511"\r3. \wG3SG1 Auto-Sniper + 35 Sarvu^n")
      
add(Body511"\r4. \wM249 + 150 Gyvybiu^n")
      
add(Body511"\r0. \wExit^n")
   }

   new 
g_Keys = (1<<1<<1<<9)
   
show_menu(idg_KeysBody, -1"menu_rod")

   return 
PLUGIN_CONTINUE
}

public 
Pressedrod(idkey)
{
   new 
CsTeams:iTeam cs_get_user_team(id)

   switch(
key)
   {
      case 
0:
      {
         if (
iTeam == CS_TEAM_T)
         {
            
set_user_health(id9000)
            
client_print(idprint_chat"VIP ## You are with 9'000 health points.")
            
client_print(idprint_chat"VIP ## You are with 9'000 health points.")
         }

         else if (
iTeam == CS_TEAM_CT)
         {
            
set_user_armor(id100)
            
client_print(idprint_chat"VIP ## You get 100 armor.")
            
client_print(idprint_chat"VIP ## You get 100 armor.")
         }
      }

      case 
1:
      {
         if (
iTeam == CS_TEAM_T)
         {
            
give_item(id"weapon_knife")
         }

         else if (
iTeam == CS_TEAM_CT)
         {
            
set_user_health(id370)
            
client_print(idprint_chat"VIP ## You are with 370 health.")
            
client_print(idprint_chat"VIP ## You are with 370 health.")
     }
      }

      case 
2:
      {
         if (
iTeam == CS_TEAM_T)
         {
            
give_item(id"weapon_knife")
         }

         else if (
iTeam == CS_TEAM_CT)
         {
            
give_item(id"weapon_g3sg1")
            
cs_set_user_bpammo(idCSW_G3SG190)
            
set_user_armor(id35)
            
client_print(idprint_chat"VIP ## You get a super sniper and 35 armor.")
            
client_print(idprint_chat"VIP ## You get a super sniper and 35 armor.")
         }
      }

      case 
3:
      {
         if (
iTeam == CS_TEAM_T)
         {
            
give_item(id"weapon_knife")
         }

         else if (
iTeam == CS_TEAM_CT)
         {
            
give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249200)
            
set_user_health(id150)
            
client_print(idprint_chat"VIP ## You get a machinegun and 150health.")
            
client_print(idprint_chat"VIP ## You get a machinegun and 150health.")
         }
      }

      default: return 
PLUGIN_HANDLED
   
}

   return 
PLUGIN_CONTINUE




All times are GMT -4. The time now is 11:14.

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