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;
}