Raised This Month: $ Target: $400
 0% 

few things


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
daniel46
Senior Member
Join Date: Dec 2011
Old 09-02-2012 , 15:30   few things
Reply With Quote #1

1.how can i remove game command?

2.i want to build a rambo mod and i started but the mod dont work why is it?could some one fix for me?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>

#define PLUGIN "Rambo Mod"
#define VERSION "1.0"
#define AUTHOR "MaRs"

#define _random(%1) random_num(0, %1 - 1)

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("RoundEnd"2"1=Round_End")
    
    
register_clcmd("say /rambo""CmdRambo");
}
    
public 
client_putinserver(id)
{
    
cs_set_user_team(idCS_TEAM_T)
}

public 
RoundEnd()
{
   for (new 
idid <= 32id++){
   
cs_set_user_team(idCS_TEAM_T)
   }
}
public 
CmdRambo() set_task(1.0"RamboMod")
public 
RamboMod(id)
{
        static 
randomplayer
        
        
static players[32], numiid
        get_players
(playersnum"a")
        
        
randomplayer players[_random(num)]
        
        for(
0numi++)
        {
            
id players[i]
            if(
id == randomplayer)
            {
                new 
name[32];
                
get_user_name(idname31)
                
cs_set_user_team(id,CS_TEAM_CT); 
                
ExecuteHam(Ham_CS_RoundRespawnid
                
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.00.2626.010.00.251.5)
                
show_hudmessage(0"%s Is Rambo Kill Hemm!!!")
                
set_task(1.0"ActionRandomDay"id)
                
set_task(0.9"RamboModel"id)
            }
        }
}
public 
RamboSpawn(idExecuteHamB(Ham_CS_RoundRespawnid)
public 
RamboModel(id)
{
   
// cs_set_user_model(id, "rambo_player")
    
fm_give_item(id,"weapon_m249")
    
    
cs_set_user_bpammo(idCSW_M2499999 

dont look at the includes i just puted them also it was on round start the rambo mod and i changed it to command to check

Last edited by daniel46; 09-02-2012 at 15:41.
daniel46 is offline
Old 09-02-2012, 15:38
Torge
This message has been deleted by Torge. Reason: I was wrong, sorry.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-03-2012 , 14:12   Re: few things
Reply With Quote #2

Quote:
Originally Posted by daniel46 View Post
1.how can i remove game command?
What?
__________________
fysiks is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 09-04-2012 , 04:01   Re: few things
Reply With Quote #3

1. Not possible on client-side commands, but possible on server-side commands.

2. Try:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>
#define PLUGIN "Rambo Mod"
#define VERSION "1.0"
#define AUTHOR "MaRs"
#define _random(%1) random_num(0, %1 - 1)
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("RoundEnd"2"1=Round_End")
    
    
register_clcmd("say /rambo""CmdRambo");
    
    
RegisterHamHam_Spawn"player""PlayerSpawn");
}
public 
PlayerSpawn(id){
 if (! 
cs_get_user_team(id) == CS_TEAM_T)
  
cs_set_user_team(idCS_TEAM_T)
}
public 
RoundEnd()
{
   for (new 
idid <= 32id++){
   if (! 
cs_get_user_team(id) == CS_TEAM_T)
 
cs_set_user_team(idCS_TEAM_T)
   }
}
public 
CmdRambo() set_task(1.0"RamboMod")
public 
RamboMod(id)
{
        static 
randomplayer
        
        
static players[32], numiid
        get_players
(playersnum"a")
        
        
randomplayer players[_random(num)]
        
        for(
0numi++)
        {
            
id players[i]
            if(
id == randomplayer)
            {
                new 
name[32];
                
get_user_name(idname31)
                
cs_set_user_team(id,CS_TEAM_CT); 
                
ExecuteHam(Ham_CS_RoundRespawnid
                
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.00.2626.010.00.251.5)
                
show_hudmessage(0"%s Is Rambo Kill Hemm!!!")
                
set_task(1.0"ActionRandomDay"id)
                
set_task(0.9"RamboModel"id)
            }
        }
}
public 
RamboSpawn(idExecuteHamB(Ham_CS_RoundRespawnid)
public 
RamboModel(id)
{
 if (
is_user_connected(id) && is_user_alive(id)){
    
cs_set_user_model(id"rambo_player")
    
fm_give_item(id,"weapon_m249")
    
    
cs_set_user_bpammo(idCSW_M2499999 
   }

Sorry but i don't have time.
__________________
simanovich is offline
daniel46
Senior Member
Join Date: Dec 2011
Old 09-04-2012 , 14:13   Re: few things
Reply With Quote #4

Quote:
Originally Posted by simanovich View Post
1. Not possible on client-side commands, but possible on server-side commands.

2. Try:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>
#define PLUGIN "Rambo Mod"
#define VERSION "1.0"
#define AUTHOR "MaRs"
#define _random(%1) random_num(0, %1 - 1)
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("RoundEnd"2"1=Round_End")
    
    
register_clcmd("say /rambo""CmdRambo");
    
    
RegisterHamHam_Spawn"player""PlayerSpawn");
}
public 
PlayerSpawn(id){
 if (! 
cs_get_user_team(id) == CS_TEAM_T)
  
cs_set_user_team(idCS_TEAM_T)
}
public 
RoundEnd()
{
   for (new 
idid <= 32id++){
   if (! 
cs_get_user_team(id) == CS_TEAM_T)
 
cs_set_user_team(idCS_TEAM_T)
   }
}
public 
CmdRambo() set_task(1.0"RamboMod")
public 
RamboMod(id)
{
        static 
randomplayer
        
        
static players[32], numiid
        get_players
(playersnum"a")
        
        
randomplayer players[_random(num)]
        
        for(
0numi++)
        {
            
id players[i]
            if(
id == randomplayer)
            {
                new 
name[32];
                
get_user_name(idname31)
                
cs_set_user_team(id,CS_TEAM_CT); 
                
ExecuteHam(Ham_CS_RoundRespawnid
                
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.00.2626.010.00.251.5)
                
show_hudmessage(0"%s Is Rambo Kill Hemm!!!")
                
set_task(1.0"ActionRandomDay"id)
                
set_task(0.9"RamboModel"id)
            }
        }
}
public 
RamboSpawn(idExecuteHamB(Ham_CS_RoundRespawnid)
public 
RamboModel(id)
{
 if (
is_user_connected(id) && is_user_alive(id)){
    
cs_set_user_model(id"rambo_player")
    
fm_give_item(id,"weapon_m249")
    
    
cs_set_user_bpammo(idCSW_M2499999 
   }

Sorry but i don't have time.
thanks the set team work but the give weapon dont work also you dont do it like this
! cs_get_user_team(id) == CS_TEAM_T

>>>
cs_get_user_team(id) == !CS_TEAM_T

Quote:
Originally Posted by fysiks View Post
What?
if there is 1 player in the server and other 1 join its do auto restart

game commencing can i remove it?
daniel46 is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 09-04-2012 , 14:14   Re: few things
Reply With Quote #5

Yes you can.

http://forums.alliedmods.net/showthread.php?t=59507
Torge is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-04-2012 , 14:19   Re: few things
Reply With Quote #6

Quote:
Originally Posted by daniel46 View Post
thanks the set team work but the give weapon dont work also you dont do it like this
! cs_get_user_team(id) == CS_TEAM_T

>>>
cs_get_user_team(id) == !CS_TEAM_T

cs_get_user_team(id) != CS_TEAM_T
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
daniel46
Senior Member
Join Date: Dec 2011
Old 09-04-2012 , 14:24   Re: few things
Reply With Quote #7

o oooops my mistake and also tnx realy helped

also can i have a code that you cant pick up weapons(with bool)
daniel46 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 08:14.


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