Raised This Month: $ Target: $400
 0% 

how block command buy and something more.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AppStore
BANNED
Join Date: Dec 2009
Location: Saladillo
Old 01-02-2010 , 06:27   how block command buy and something more.
Reply With Quote #1

how can I detect the next round ie for example in the zombie plague when choosing a kind of zombie, the next round will get you wanted to know how is the code ..
and wanted to know also as commands blocke purchase, this did not help me.
http://forums.alliedmods.net/showthr...ght=como+block
Thank you very much
AppStore is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 01-02-2010 , 19:08   Re: how block command buy and something more.
Reply With Quote #2

You can change the map_parameters.. But if you wan't to change only 1 round you can't do it. When you change this you can't come back at least you restart the map..
PHP Code:
#include <engine>
#include <amxmisc>
#include <amxmodx>

public plugin_precache () {
        
//If info_map_parameters exists
        
if (find_ent_by_class(iEnt"info_map_parameters"))
            
//Change the value "buying" to 3:
            //So you know, info_map_parameters is an entity that with their
            //settings you can change the bomb radius and the buy
            //The "buying" parameter has 4 values:
            //0- All can buy
            //1- Only CT can buy
            //2- Only TT can buy
            //Neither can buy
            
DispatchKeyValue("info_map_parameters""buying""3")
        
        else {
            
//If the entity doesn't exists
            //I create the entity, i set the buying value in 3 (previously explained) and i spawn it
            
ENT_CLASS create_entity("info_map_parameters")
            
DispatchKeyValue(ENT_CLASS"buying""3")
            
DispatchSpawn(ENT_CLASS)
        }


Last edited by Mxnn; 01-02-2010 at 19:10.
Mxnn is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-02-2010 , 19:11   Re: how block command buy and something more.
Reply With Quote #3

Bad idea to use plugin_precache because the entities are not created yet. Use the keyvalue forward or hook its spawn.
__________________
Arkshine 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 04:07.


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