/irc chat to message admins
#3

Iґve tried it alone but get a bunch of errors, whats wrong here?

Code:
	if(strcmp(cmd, "/irc", true) == 0) // Available for everyone: reports a player to the admins
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, ORANGE, "USAGE: /irc [text]");
			SendClientMessage(playerid, ORANGE, "FUNCTION: Will send a message to the online admins");
			return 1;
	 	}
		new targetid = ReturnUser(tmp);
		if(targetid != INVALID_PLAYER_ID)
		{
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new reason[128];
			reason = bigstrtok(cmdtext, idx);
			if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /irc [text]");
			format(string, sizeof(string), "|- %s on IRC: %s ]", sendername,giveplayername,reason);
			SendClientMessageToAdmins(ADMIN_RED, string,1);
			format(string, sizeof(string), "Your message has been sent to the online admins.", giveplayername);
			SendClientMessage(playerid, GREEN, string);
		return 1;
	}
Reply


Messages In This Thread
/irc chat to message admins - by Striker_Moe - 31.08.2009, 13:22
Re: /irc chat to message admins - by Striker_Moe - 31.08.2009, 13:46
Re: /irc chat to message admins - by Striker_Moe - 31.08.2009, 14:18
Re: /irc chat to message admins - by Striker_Moe - 31.08.2009, 14:30
Re: /irc chat to message admins - by Striker_Moe - 31.08.2009, 15:26

Forum Jump:


Users browsing this thread: 1 Guest(s)