Jump to content
  • 0

Problema comanda "/admin" ori "/a"


Question

Posted

Am vrut sa fac sa apara : " Admin X-ulescu : Numai faceti spam sau primit kick!

Si sa apara Admin si ce spune cu alb dar "X-ulescu" cu culoarea rosie.

Si imi apar caractere aiurea. Aceasta e comanda.

if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SCM(playerid, COLOR_GRAD2, "Syntax: (/a)dmin [admin chat]");
				return 1;
			}
			result[0] = toupper(result[0]);
			format(string, sizeof(string), "*{1FE9FF}%d Admin {1FE9FF}%s:", PlayerInfo[playerid], sendername, result);
			if (PlayerInfo[playerid][pAdmin] == 6)
			{
				SendAdminMessage(COLOR_WHITE, string);
				return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				SendAdminMessage(COLOR_WHITE, string);
			}
			printf("Admin %s: %s", sendername, result);
			new y,m,d;
		    new h,mi,s;
  		    getdate(y,m,d);
 	   	 	gettime(h,mi,s);
   		    format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d]*%d Admin %s: %s",d,m,y,h,mi,s,PlayerInfo[playerid][pAdmin], sendername, result);
   		    CAdminLog(string);
		}
		return 1;
	}

2 answers to this question

Recommended Posts

Posted

[pawn]format(string, sizeof(string), "*{1FE9FF}%d Admin {1FE9FF}%s:", PlayerInfo[playerid], sendername, result);[/pawn]

inlocuie cu:

[pawn]format(string, sizeof(string), "*{FFFFFF}%d Admin {FF0000}%s:", sendername, result);[/pawn]

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.