Raised This Month: $ Target: $400
 0% 

[ZP] Addon: First Zombie Bonus Menu.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DSASDFGH
Senior Member
Join Date: Jul 2011
Location: Facebook
Old 08-15-2011 , 16:25   Re: [ZP] Addon: First Zombie Bonus Menu.
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#define KEYSMENU  MENU_KEY_1 | MENU_KEY_2
#define NEMESIS_COST 25
public plugin_init()
{
 
register_plugin("[ZP] Addon: First Zombie Bonus Menu""0.1""WPMG Team")
 
register_menu("Buy Nemesis?"KEYSMENU"menu_handler")
}
public 
zp_round_started(gamemodeid)
{
 if(
gamemode != MODE_INFECTION)
  return 
PLUGIN_HANDLED
 
if(zp_get_user_first_zombie(id))
 {
  new 
menu[256]
  
formatex(menucharsmax(menu), "\y네메시스를 구입하시겠습니까? \r가격: %d 탄약팩.^n^n\r1. \w%s^n\r2. \w아니오."NEMESIS_COSTzp_get_user_ammo_packs(id) > NEMESIS_COST "\w예." "\d아니오.")
  
show_menu(idKEYSMENUmenu, -1"Buy Nemesis?")
 }
 return 
PLUGIN_CONTINUE
}
public 
menu_handler(idkey)
{
 
key++
 switch(
key)
 {
  case 
1:
  {
   if(
zp_get_user_ammo_packs(id) > NEMESIS_COST)
   {
    
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) - NEMESIS_COST)
    
zp_make_user_nemesis(id)
    
client_printcolor(id"^4[ZP] ^1네메시스를 구입했습니다.")
   }
   else
   {
    
client_printcolor(id"^4[ZP] ^1탄약팩이 부족합니다.")
   }
  }
 }
 return 
PLUGIN_HANDLED
}
stock client_printcolor(const id, const input[], any:...)
{
 new 
iCount 1iPlayers[32]
 static 
szMsg[191]
 
vformat(szMsgcharsmax(szMsg), input3)
 
replace_all(szMsg190"/g""^4")
 
replace_all(szMsg190"/y""^1")
 
replace_all(szMsg190"/ctr""^3")
 
replace_all(szMsg190"/w""^0")
 if(
idiPlayers[0] = id
 
else get_players(iPlayersiCount"ch")
 for (new 
0iCounti++)
 {
  if(
is_user_connected(iPlayers[i]))
  {
   
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _iPlayers[i])
   
write_byte(iPlayers[i])
   
write_string(szMsg)
   
message_end()
  }
 }

This is korean version ^^ you should save it with UTF-8
DSASDFGH is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:15.


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