id 0 problem
#1

hey guys i have this help command but it has a problem if the player who needed help is id 0 the admin who answear to his report with /nre message is getting "unknown command" but that player is getting the answear from admin

Код HTML:
CMD:nre(playerid, params[])
{
	new message[164], nstring[256];
	if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
	if(PlayerInfo[playerid][pTwinPixSecurity] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai acces la aceasta comanda!");
	if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai primit o intrebare.");
	if(sscanf(params,"s[164]", message)) return SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <id> <raspuns>");
   	if(PlayerInfo[playerid][pHelper] >= 1)
	{
 		PlayerInfo[playerid][pStaffPoints]++;
		Update(playerid, pStaffPointsx);
		Questions--;
		UpdateStaffTextdraw();

		format(gString, sizeof(gString), "(N - A) Helper %s: @%s, %s", GetName(playerid),GetName(HelperAnswer[playerid]), message);
		new string2[128];
		if(strlen(gString) > 120)
		{
			strmid(string2, gString, 110, 256);
			strdel(gString, 110, 256);

			format(gString,128,"%s ...",gString);
			format(string2,128,"... %s",string2);
		}
		foreach(new x : Player)
		{
			if(NewbieEnabled[x] == 1)
			{
		    	format(nstring, sizeof(nstring), "(N - Q) Newbie %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
				SendClientMessage(x,COLOR_YELLOW, nstring);

				if(strlen(gString) > 120)
				{
					SendClientMessage(x,COLOR_NOB, gString);
					SendClientMessage(x,COLOR_YELLOW, string2);
				}
				else
				{
					SendClientMessage(x,COLOR_NOB, gString);
				}
			}

		    if(HelperAnswer[x] == playerid)
			{
			    HelperBug(x);
			}
		}
	}
	return 1;
}
what could it be?

P.S: if the admin is 0 and player id 1+ is no bug ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)