23.05.2010, 10:37
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.
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; }