Help Command
#1

So,I have a problem,I do not know how can make an error. If a player send a message to admins,and the admin use command to solve him problem,and write another id,work,but it should not.

Here can see what is wrong,there show id 0,if I write id 1,work,and should not to work...

Ph: https://imgur.com/PZoe6Uj, https://imgur.com/PZoe6Uj

CMD:
Код HTML:
CMD:answer(playerid, params[])
{
	new Player; eString[0] = EOS; new LittleCount[10];
	//--------------------------------------------------------------------------
	if(CosminInfo[playerid][Level] < 3) return SendError2(playerid, "{E4EDF4}You must to be Admin Level 3 to use that command", "{E4EDF4}Trebuie sa fi Admin Level 3 pentru a folosi comanda respectiva");
    if(sscanf(params, "uS[250]", Player, ReqeStr)) return SendUsage(playerid, "/answer [ID]");
	if(Player == INVALID_PLAYER_ID) return SendError2(playerid, "{E4EDF4}Player is not connected", "{E4EDF4}Jucatorul nu este conectat");
	if(ServerInfo[ServerReports] == 0) return SendError2(playerid, "{E4EDF4}This player has not been having a problem", "{E4EDF4}Acest jucator nu a cerut ajutor");
	//--------------------------------------------------------------------------
	new Str[2500];
	if(CosminInfo[playerid][Language] 	   == 1) format(Str, sizeof(Str), "{3399FF}HELP REQUEST: {F81414}%s {E4EDF4}ti-a raspuns la problema", PlayerName(playerid));
	else if(CosminInfo[playerid][Language] == 0) format(Str, sizeof(Str), "{3399FF}HELP REQUEST: {F81414}%s {E4EDF4}has answered the problem", PlayerName(playerid));
	SendClientMessage(CosminInfo[Player][ReportedByy], -1, Str);
	//--------------------------------------------------------------------------
	ServerInfo[ServerReports]--; CosminInfo[Player][ReportedBy] = -1; format(ReqeStr, sizeof(ReqeStr), "%s", eString);
	//--------------------------------------------------------------------------
	format(LittleCount, 10, "%i", ServerInfo[ServerReports]);
	//--------------------------------------------------------------------------
	format(LittleCount, 10, "%i", ServerInfo[ServerReports]); TextDrawSetString(ReportInfo[1], LittleCount);
	//--------------------------------------------------------------------------
    foreach(new l: Player) if(CosminInfo[l][Level] >= 3)
	{
	    if(ServerInfo[ServerReports] == 0)      TextDrawHideForPlayer(l, ReportInfo[0]), TextDrawHideForPlayer(l, ReportInfo[1]);
	    else                                    TextDrawShowForPlayer(l, ReportInfo[0]), TextDrawShowForPlayer(l, ReportInfo[1]);
	}
	//--------------------------------------------------------------------------
	format(eString, sizeof(eString), "{3399FF}[ADMIN]: {F81414}%s {3399FF}has solved help request of the player {F81414}#%s", PlayerName(playerid), PlayerName(Player)); MessageToAdmins(COLOR_YELLOW, eString);
	//--------------------------------------------------------------------------
 	return 1;
}
Reply


Messages In This Thread
Help Command - by SeeNN - 21.03.2019, 01:19
Re: Help Command - by antixgaming - 21.03.2019, 17:11
Re: Help Command - by SeeNN - 21.03.2019, 19:43
Re: Help Command - by DaniceMcHarley - 22.03.2019, 11:08
Re: Help Command - by SeeNN - 22.03.2019, 14:23
Re: Help Command - by antixgaming - 22.03.2019, 16:19
Re: Help Command - by SeeNN - 22.03.2019, 16:24

Forum Jump:


Users browsing this thread: 2 Guest(s)