Raised This Month: $51 Target: $400
 12% 

Solved [REQ] Buy Smoke only Ts


Post New Thread Reply   
 
Thread Tools Display Modes
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 01-05-2017 , 03:23   Re: [REQ] Buy Smoke only Ts
Reply With Quote #11

@EFFx
i don't want this
@OciXCrom know what code i want

Last edited by shehzad1234; 01-05-2017 at 03:23.
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-05-2017 , 07:30   Re: [REQ] Buy Smoke only Ts
Reply With Quote #12

PHP Code:
#include <amxmodx>
#include <fun>

new bool:g_bUsed[33]

public 
plugin_init()
{
    
register_plugin("My Retarted Menu""1.0""Not Me")
    
register_logevent("OnRoundStart"2"1=Round_Start")
    
register_clcmd("say /mymenu""ShowMenu")
}

public 
OnRoundStart()
    
arrayset(g_bUsedfalsesizeof(g_bUsed))
    
public 
client_putinserver(id)
    
g_bUsed[id] = false

public ShowMenu(id)
{
    new 
iMenu menu_create("MyMenu""MenuHandler")
    
    
menu_additem(iMenu"Server Owner")     // Case 0
    
menu_additem(iMenu"Smoke")             // Case 1
    
    
menu_display(idiMenu0)
    return 
PLUGIN_HANDLED
}

public 
MenuHandler(idiMenuiItem)
{
    switch(
iItem)
    {
        case 
0client_print(idprint_chat"Serve owner: Testing")
        case 
1:
        {
            if(!
is_user_alive(id))
                
client_print(idprint_chat"sorry u need to alive!!")
            else if(
get_user_team(id) != 1)
                
client_print(idprint_chat"u can't buy this this is only for Ts u are ct please.. help me")
            else if(
g_bUsed[id])
                
client_print(idprint_chat"sorry u can't buy this nade u already purchase 1 nade in this round try next round to buy")
            else if(
user_has_weapon(idCSW_SMOKEGRENADE))
                
client_print(idprint_chat"u already have 1 smoke u can't buy")
            else
            {
                
g_bUsed[id] = true
                give_item
(id"weapon_smokegrenade")
            }
        }
    }
    
    
menu_destroy(iMenu)
    return 
PLUGIN_HANDLED

__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 01-05-2017 , 10:47   Re: [REQ] Buy Smoke only Ts
Reply With Quote #13

@OciXCrom u are understand
Thanks bro its working
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
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 18:10.


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