Raised This Month: $ Target: $400
 0% 

Proper way to attach a value to a native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-24-2010 , 22:10   Re: Proper way to attach a value to a native
Reply With Quote #4

This is all the code that changes teams. It looks solid enough to me, but I know that I can't code for !%#^. Thank you very much for you help so far. I should've known the CsTeams: .

PHP Code:
public task_force_team_join(menu_msgid[], id
{
    if (
get_user_team(id))
        return

    static 
msg_block
    msg_block 
get_msg_block(menu_msgid[0])
    
set_msg_block(menu_msgid[0], BLOCK_SET)
    
engclient_cmd(id"jointeam""5")
    
engclient_cmd(id"joinclass""5")
    
set_msg_block(menu_msgid[0], msg_block)
    
    
g_pTeam[id] = cs_get_user_team(id)

PHP Code:
public logevent_round_end()
{
    new 
players[32], num
    get_players
(playersnum)
        
    new 
player
    
for (new 0numi++)
    {
        
player players[i]
        
cs_set_user_team(playerg_pTeam[player] == CS_TEAM_T CS_TEAM_CT:CS_TEAM_T)
        
g_pTeam[player] = cs_get_user_team(player)
    }
    
print_color(0"^x04%L"LANG_SERVER"TEAMS_SWAPPED")

    
    if (
task_exists(TASK_ROUND))
        
remove_task(TASK_ROUND)
    if (
task_exists(BUILD_TASK))
        
remove_task(BUILD_TASK)
        
    return 
PLUGIN_HANDLED

CT Death Event
PHP Code:
cs_set_user_team(g_victimcs_get_user_team(g_victim) == CS_TEAM_T CS_TEAM_CT:CS_TEAM_T
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
 



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 00:08.


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