Problem with teamchat!
#7

PHP код:
CMD:r(playeridparams[])
    {
        new 
idx,tmp[32];
        new 
string[256];
        
tmp strtok(paramsidx);
        new 
length strlen(params);
        while ((
idx length) && (params[idx] <= ' '))
        {
            
idx++;
        }
        new 
offset idx;
        new 
text[64];
        while ((    
idx length) && ((idx offset) < (sizeof(text) - 1)))
        {
            
text[idx offset] = params[idx];
            
idx++;
        }
        
text[idx offset] = EOS;
        if(!
strlen(text))
        {
            
SendClientMessage(playeridCOLOR_GREY"USAGE: /radio [text]");
            return 
1;
        }
        if(
gTeam[playerid] == TEAM_GROVE && PlayerInfo[playerid][pTeam] == 1// this will see if he is in a Team
        
{
            if(
gTeam[playerid] == TEAM_GROVE// so he is Grove
              
{
                
format(stringsizeof(string), "[TEAM-CHAT]%s Says : "PlayerName[playerid], text); // will send the message
                
SendTeamMessage(TEAM_GROVECOLOR_BLUEstring); // will give the team message in the color BLUE
            
}
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED,"You are not a part of the Grove team!.");
        }
        return 
1;
    } 
Something like this
Reply


Messages In This Thread
Problem with teamchat! - by Twisted_Insane - 31.03.2012, 13:10
Re: Problem with teamchat! - by vyper - 31.03.2012, 14:18
Re: Problem with teamchat! - by sjvt - 31.03.2012, 14:31
Re: Problem with teamchat! - by Twisted_Insane - 31.03.2012, 14:59
Re: Problem with teamchat! - by Randyy - 31.03.2012, 15:02
Re: Problem with teamchat! - by Twisted_Insane - 31.03.2012, 15:08
Re: Problem with teamchat! - by Randyy - 31.03.2012, 15:14
AW: Problem with teamchat! - by Nero_3D - 31.03.2012, 15:16
Re: Problem with teamchat! - by Randyy - 31.03.2012, 15:19
Re: Problem with teamchat! - by Twisted_Insane - 31.03.2012, 15:25

Forum Jump:


Users browsing this thread: 2 Guest(s)