/cb chat needed
#2

pawn Код:
CMD:changeroom(playerid, params[])
{
    new room;
    if(sscanf(params,"i",room))
        return SendClientMessage(playerid, -1, "Usage: /cb [room]");
    else
    {
        //Send a message showing that he changes the room!
        Room[playerid] = room;
    }
}

CMD:cb(playerid, params[])
{
    new text[128];
    if(sscanf(params, "s",text))
        return //Usage: bla bla bla
    else
    {
        format(string,sizeof(string), "[Room %d]%s Says: %s",Room[playerid], PLAYERNAME, text);//you must get the player name or use a stock if you have...
        for(new i=0; i<MAXPLAYERS; i++)
        {
            if(Room[i] == Room[playerid])
            SendClientMessage(i, -1, string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
/cb chat needed - by hydronic - 28.09.2011, 18:45
Re: /cb chat needed - by Pharrel - 28.09.2011, 19:14
Re: /cb chat needed - by hydronic - 29.09.2011, 03:39
Re: /cb chat needed - by hydronic - 29.09.2011, 14:13
Re: /cb chat needed - by Jafet_Macario - 29.09.2011, 14:15
Re: /cb chat needed - by hydronic - 29.09.2011, 14:24
Re: /cb chat needed - by hydronic - 30.09.2011, 04:20

Forum Jump:


Users browsing this thread: 2 Guest(s)