Raised This Month: $ Target: $400
 0% 

help make the map a player when it comes to T flag


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kent4
Junior Member
Join Date: Oct 2011
Location: Russia, Perm
Old 11-04-2011 , 10:47   help make the map a player when it comes to T flag
Reply With Quote #1

PHP Code:
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#define VIP_FLAG ADMIN_LEVEL_H


public plugin_init()
{
    
register_plugin("VIP Privileges""1.1""Kent-4");
    
register_event("HLTV""event_round_start""a""1=0""2=0");
    
register_event("ResetHUD""ResetHUD""be")
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
    
    
register_clcmd("say /adminka""adminka");
    
register_clcmd("say /vip","ShowMotd");
    
register_clcmd("say""handle_say");
    }

public 
plugin_precache() 
{
    
precache_model("models/player/vip_t/vip_t.mdl")
    
precache_model("models/player/vip_ct/vip_ct.mdl")
        return 
PLUGIN_CONTINUE
}

public 
fwHamPlayerSpawnPost(id
{
        if (
get_user_flags(id) & VIP_FLAG
        {
                new 
CsTeams:userTeam cs_get_user_team(id)
                if (
userTeam == CS_TEAM_T) {
                        
cs_set_user_model(id"vip_t")
                }
                else if(
userTeam == CS_TEAM_CT) {
                        
cs_set_user_model(id"vip_ct")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE
}

public 
client_putinserver(id)
{
    
set_task(0.1"vip_connect"id);
}

public 
vip_connect(id)
{
if ( 
get_user_flags id ) & VIP_FLAG )
    {
        new 
name[32];
        
get_user_name(idname31);
        
client_print(0,print_chat"Внимание подключился VIP"name)
    }
return 
PLUGIN_HANDLED
}
public 
ResetHUD(id)
{
    
set_task(0.5"VIP"id 6910)
}
public 
VIP(TaskID)
{
    new 
id TaskID 6910
    
    
if ( get_user_flags id ) & VIP_FLAG )
    {
        
message_begin(MSG_ALLget_user_msgid("ScoreAttrib"))
        
write_byte(id)
        
write_byte(4)
        
message_end()
        
give_item(id,"weapon_hegrenade")
        
give_item(id,"weapon_flashbang")
        
give_item(id,"weapon_flashbang")
        
give_item(id,"weapon_smokegrenade")
        
give_item(id,"item_assaultsuit")    
    }
    
    return 
PLUGIN_HANDLED
}

public 
ShowMotd(id)
{
 
show_motd(id"vip.txt")
}

public 
adminka(id)
{
 
show_motd(id"adminka.txt")
}

stock ChatColor(const id, const input[], any:...) 
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!team""^3"// Team Color
    
replace_all(msg190"!team2""^0"// Team2 Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1251\\ deff0\\ deflang1049{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
plug-in compiles, but does not work
player when it comes to the flag T, there is no chat messages

the mistake in my code?
kent4 is offline
Send a message via ICQ to kent4
 



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 14:18.


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