Dont Have Any Idea ?
#1

Код:
dcmd_a(playerid,params[])
{
    new msg[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_RED, "Unknown command. Use /cmds to see our server commands.");
 	if(sscanf(params,"s",msg))
	{
  		SendClientMessage(playerid,COLOR_RED,"USAGE: /a [Message]");
	    return 1;
	}
	format(msg,sizeof(msg),"%s:   %s",PlayerName(playerid),msg);
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(PlayerInfo[i][pAdmin] > 0)
		{
		    SendClientMessage(i,COLOR_PURPLE,msg);
		}
	}
	return 1;
}
Here is my selfmade admin chat , and its working fine , except that it can not display more than aprox 60-80 char.
I tried with new msg[512] but no effect :S

Where is the prob?
Reply
#2

Change:
pawn Код:
sscanf(params,"s",msg)
To:
pawn Код:
sscanf(params,"s[128]",msg)
(the max length of the string you are searching for, to put in msg variable)
Reply
#3

Thank you . I forgot that
+rep
Reply
#4

Haha, me too, many times, that's why I could help.
I'm glad to help you.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)