[HELP] TeamChat + /smack
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/fm", cmdtext, true, 3) == 0)
    {
        if(gTeam[playerid] == TEAM_FISHER)
        {
            if(cmdtext[3] == 0)
            {
                SendClientMessage(playerid,COLOR_RED,"USAGE: /fm <message>");
                return 1;
            }
            new name[MAX_PLAYER_NAME], string[128];
            GetPlayerName(playerid, name, sizeof(name));
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(gTeam[i] == gTeam[playerid])
                    {
                        format(string, sizeof(string), "FISH MESSAGE: %s(%d) %s",name, playerid,cmdtext[4]);
                        SendClientMessage(i, COLOR_TEAMCHAT, string);
                    }
                }
            }
        }
        return 1;
    }
    return 0;
}
Can't make right now the /smack command workable because i need to go to sleep. I will make it as soon as possible if someone else won't do it.
Reply


Messages In This Thread
[HELP] TeamChat + /smack - by Larsey123IsMe - 16.01.2011, 17:02
Re: [HELP] TeamChat + /smack - by Franck_ - 16.01.2011, 17:44
Re: [HELP] TeamChat + /smack (TeamChat = Solved) - by Larsey123IsMe - 16.01.2011, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)