Raised This Month: $ Target: $400
 0% 

host_error: issues


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
killergirl
Senior Member
Join Date: Jul 2010
Old 04-18-2011 , 17:07   Re: host_error: issues
Reply With Quote #3

PHP Code:
public sendMessage (color[], alive)
{
    new 
teamName[10]
    
    for (new 
player 1player maxPlayersplayer++)
    {
        if(!
is_user_bot(player))
        {
            if(
is_user_connected(player))
            {
                
get_user_team (playerteamName9)    // Stores user's team name to change back after sending the message
                            
                
changeTeamInfo (playercolor)        // Changes user's team according to color choosen
                            
                
writeMessage (playermessage)        // Writes the message on player's chat
                            
                
changeTeamInfo (playerteamName)    // Changes user's team back to original
            
}
        }
    }

PHP Code:
public sendTeamMessage (color[], aliveplayerTeam)
{
    new 
teamName[10]
    
    for (new 
player 1player maxPlayersplayer++)
    {
        if(!
is_user_bot(player))
        {
            if (
get_user_team(player) == playerTeam)
            {
                if(
is_user_connected(player))
                {
                    
get_user_team (playerteamName9)    // Stores user's team name to change back after sending the message
                                
                    
changeTeamInfo (playercolor)        // Changes user's team according to color choosen
                                
                    
writeMessage (playermessage)        // Writes the message on player's chat
                                
                    
changeTeamInfo (playerteamName)    // Changes user's team back to original
                
}
            }
        }
    }

PHP Code:
public changeTeamInfo (playerteam[])
{
    if(
is_user_connected(player))
    {
        if(!
is_user_bot(player))
        {
            
message_begin (MSG_ONEteamInfo_player)    // Tells to to modify teamInfo (Which is responsable for which time player is)
            
write_byte (player)                // Write byte needed
            
write_string (team)                // Changes player's team
            
message_end()
        }
    }
}


public 
writeMessage (playermessage[])
{
    if(
is_user_connected(player))
    {
        if(!
is_user_bot(player))
        {
            
message_begin (MSG_ONEsayText, {000}, player)    // Tells to modify sayText (Which is responsable for writing colored messages)
            
write_byte (player)                    // Write byte needed
            
write_string (message)                    // Effectively write the message, finally, afterall
            
message_end ()                        // Needed as always
        
}
    }

killergirl 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 20:09.


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