Help!
#3

Quote:
Originally Posted by Devon007
Посмотреть сообщение
Maybe This

Код:
COMMAND:c(playerid, params[])
{
	if (pInfo[playerid][Adminlevel] > 5){

		new string[256],idx,length = strlen(params);

		while ((idx < length) && (params[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[512];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = params[idx];
			idx++;
		}
		result[idx - offset] = EOS;
		if (!strlen(result))
		{
			SendClientMessage(playerid, RED, "USAGE: /C (Message).");
		}
		format(string, sizeof(string), "(ADMIN) %s (%i): %s", pInfo[playerid][Name],playerid,result);
		SendClientMessageToAdmins(GREEN, string);
	}else{
		SendClientMessage(playerid, RED, "Unknown Command.");
	}
	return 1;
}
You Should Change This
Код:
pInfo[playerid][Name]
AND This
Код:
pInfo[playerid][Adminlevel]
To Your Script enums
thank you for your help.
Reply


Messages In This Thread
Help! - by FlowOver - 24.09.2015, 01:14
Re: Help! - by Devon007 - 24.09.2015, 08:03
Re: Help! - by FlowOver - 24.09.2015, 16:42
Re: Help! - by FlowOver - 24.09.2015, 16:49
Re: Help! - by Aly - 24.09.2015, 17:13
Re: Help! - by FlowOver - 24.09.2015, 17:14
Re: Help! - by rappy93 - 24.09.2015, 17:23
Re: Help! - by Aly - 24.09.2015, 17:32

Forum Jump:


Users browsing this thread: 3 Guest(s)