Server crash when type commands [mAdmin]
#1

Hello

I have a little question/problem. I use mAdmin and when I go in game as an Admin and type /reloadfs it works fine. Next to that I type /gmx. Fine here too.
But when I type now /announce or /announce2 and the message it crash the server.

What to do? Say when you need more infomration.
I would be grateful if someone can help.

Код:
dcmd_announce(playerid, params[])
{
	new pName[24], str[128];
	if(PlayerInfo[playerid][AdminLevel] < 1) return false;
	GetPlayerName(playerid, pName, sizeof(pName));
	if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /announce [message]");
	
	SendClientMessageToAll(COLOR_BRIGHTRED, "-------------------------");
	SendClientMessageToAll(COLOR_YELLOW, params);
	SendClientMessageToAll(COLOR_BRIGHTRED, "-------------------------");
  format(str, sizeof(str), "Mod Message: %s (ID: %d) has announced: '%s'.", pName, playerid);
  SendModMsg(COLOR_WHITE, str);
  return 1;
}

dcmd_announce2(playerid, params[])
{
	new pName[24], str[128];
	if(PlayerInfo[playerid][AdminLevel] < 1) return false;
	GetPlayerName(playerid, pName, sizeof(pName));
	if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /announce2 [message]");

	GameTextForAll(params, 3000, 6);
  format(str, sizeof(str), "Mod Message: %s (ID: %d) has announced: '%s'.", pName, playerid);
  SendModMsg(COLOR_WHITE, str);
  return 1;
}
Reply
#2

SendModMsg(COLOR_WHITE, str);
check that out?

why not just use sendclientmessagetoall instead?
Reply
#3

Cause no one want to know which admin use announce.
And it prevent to spam the chat.

I check that with SendModMsg..

[EDIT]

Well, I just delete >SendModMsg< and put >SendAdminMsg< there. In this way it works.
Thanks for help..I could make it without creating a topic but you know, sometimes the answers is infront of you and you donґt see it xD
Reply
#4

use
Код:
sendclientmessage(playerid); ??
Reply
#5

Nvm. Problem solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)