How to make message to all *public chat*
#1

Hi,

I'm fairly new to this, I'm using a Runix's CnR, I wasn't wasn't working way I wanted, so i played alittle with it, got a abit of understanding, but I want to know how do i make it so If someone types "Hello" or anything for that matter, to goes so everyone sees it, like a public chat...

Heres the code being used, if its wrong, please don't flame, I wouldn't have been able to tell anyway :P

{
if(text[0] == '@' && AccountInfo[playerid][aLevel] > 0)
{
new string[256], name[60], message[350];
GetPlayerName(playerid, name, 60);
strmid(string, text, 1, strlen(text), 256);
format(message, 350, "%s: %s", name, string);
for(new i;i<MAX_PLAYERS;i++)
{
if(AccountInfo[i][aLevel] > 0)
{
SendPlayerMessageToAll(playerid, message);
}
}
return 0;
}

I tried adding the "SendPlayerMessageToAll", hoping it would fix it lol, i was wrong the server was designed so messages would only appear to people near by, but I much prefer the public chat
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)