[HELP]Helpme
#1

Ok so what i want to make is a system that sends a message to all admins.
Basicly for help talking to a real person. Can someone tell me if this script is right for what i said above?
I get this error when compiling: warning 203: symbol is never used: "dcmd_helpme"; I have also added dcmd_helpme where all the other dcmd commands are listed with the right number of letters (6).

Код:
dcmd_helpme(playerid,params[]) {
    new helpme, tmp[256], tmp2[256], Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
    if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /helpme [reason]);
	reported = strval(tmp);

 	if(IsPlayerConnected(reported) && reported != INVALID_PLAYER_ID) {
		if(PlayerInfo[reported][Level] == ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot report this administrator");
		if(playerid == reported) return SendClientMessage(playerid,red,"ERROR: You Cannot Help yourself");
		if(strlen(params) > 7) {
			new reportedname[MAX_PLAYER_NAME], reporter[MAX_PLAYER_NAME], str[128], hour,minute,second; gettime(hour,minute,second);
			GetPlayerName(reported, reportedname, sizeof(reportedname));	GetPlayerName(playerid, reporter, sizeof(reporter));
			format(str, sizeof(str), "||HelpNeeded||  %s(%d) Needs Help %s(%d) Reason: %s |@%d:%d:%d|", reporter,playerid, reportedname, reported, params[strlen(tmp)+1], hour,minute,second);
			MessageToAdmins(COLOR_WHITE,str);
			SaveToFile("ReportLog",str);
			format(str, sizeof(str), "Sent Request(%d:%d:%d): %s(%d) Helped %s(%d) Reason: %s", hour,minute,second, reporter,playerid, reportedname, reported, params[strlen(tmp)+1]);
			for(new i = 1; i < MAX_REPORTS-1; i++) Reports[i] = Reports[i+1];
			Reports[MAX_REPORTS-1] = str;
			return SendClientMessage(playerid,yellow, "Your help request has been sent to online administrators.");
		} else return SendClientMessage(playerid,red,"ERROR: Must be a valid reason");
	} else return SendClientMessage(playerid, red, "Player is not connected");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)