/report Help
#1

I need a /report command that will show to all admins on my current admin filterscript. If you need some sort of resource from my script, reply. Here is a snippet if you need some info:

I just need a command that allows a player to /report ID REASON, I do not need it to be in mysql form. Just a simple command that shows to admins please.

Код:
	if (strcmp(cmd, "/kick", true) == 0)
	{
	  if (PlayerInfo[playerid][Admin] >=1 || IsPlayerAdmin(playerid))
		{
			tmpp = strtok(cmdtext, idx);
			if	(!strlen(tmpp))
			{
				SendClientMessage(playerid, COLOR_GREEN, "USAGE: /kick [playerid] [reason]");
				return 1;
			}
			pid = strval(tmpp);
			
			if 	(!(IsPlayerConnected(pid)))
			{
				SendClientMessage(playerid, COLOR_RED, "THAT PLAYER IS NOT CONNECTED!");
				return 1;
			}
			GetPlayerName(pid, pidName, sizeof(pidName));
			GetPlayerName(playerid, AdminName, sizeof(AdminName));
			GetPlayerIp(playerid,AdminIP,20);
			GetPlayerIp(pid, PidIP, 20);
			gettime(hour, minute, second);
			getdate(year, month, day);
			format(query, sizeof(query), "INSERT INTO `kick` (kickid, kicked, kickedip, kicker, kickerip, reason, time, date) VALUES(0, \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%d:%d:%d\", \"%d.%d.%d\")", pidName, PidIP, AdminName, AdminIP, cmdtext[idx], hour, minute, second, day, month, year);
			samp_mysql_query(query);
			samp_mysql_store_result();
      format(string, sizeof(string), "~RecludeBot~ %s (ID: %d) has been kicked ! Reason: %s | Time: %d:%d:%d | Date: %d.%d.%d", pidName, pid, cmdtext[idx], hour, minute, second, day, month, year);
			SendClientMessageToAll(COLOR_RED, string);
			print(string);
			Kick(pid);
		}
		else
		{
	  	SendClientMessage(playerid,COLOR_RED,"~RecludeBot~ You can't use that command !");
			return 1;
		}
		return 1;
	}
Reply


Messages In This Thread
/report Help - by omgunoobjk - 23.05.2010, 10:37
Re: /report Help - by Blt950 - 23.05.2010, 10:40
Re: /report Help - by DJDhan - 23.05.2010, 10:41
Re: /report Help - by omgunoobjk - 23.05.2010, 10:45
Re: /report Help - by Blt950 - 23.05.2010, 10:50
Re: /report Help - by omgunoobjk - 23.05.2010, 10:53
Re: /report Help - by Blt950 - 23.05.2010, 10:56

Forum Jump:


Users browsing this thread: 1 Guest(s)