YCMD:report(playerid, params[], help) {
if(help) {
SendClientMessage(playerid, X11_WHITE, "Used for reporting a player");
return 1;
}
if(GetPVarInt(playerid, "ReportBanned") == 1) {
SendClientMessage(playerid, X11_TOMATO_2, "You are report banned!");
return 1;
}
new input[128],msg[128];
if(!sscanf(params, "s[128]", input)) {
new time = GetPVarInt(playerid, "RequestChatCooldown");
new timenow = gettime();
if(REQUESTCHAT_COOLDOWN-(timenow-time) > 0) {
SendClientMessage(playerid, X11_TOMATO_2, "You must wait before sending another report!");
return 1;
}
SetPVarInt(playerid, "RequestChatCooldown", gettime());
format(msg, sizeof(msg), "Report from [%d]%s: {EE0000}%s", playerid, GetPlayerNameEx(playerid, ENameType_CharName), input);
ABroadcast(X11_ORANGE, msg, EAdminFlags_All);
AdminLog(playerid, msg);
SendClientMessage(playerid, X11_WHITE, "Your report has been sent to the admins, please be patient and wait until an admin can help you.");
//SendClientMessage(playerid, X11_YELLOW, input);
SetPVarInt(playerid, "SentReport", 1);
SetPVarString(playerid, "ReportText", input);
} else {
SendClientMessage(playerid, X11_WHITE, "USAGE: /report [message]");
}
return 1;
}
YCMD:report(playerid, params[], help) {
if(help) {
SendClientMessage(playerid, X11_WHITE, "Used for reporting a player");
return 1;
}
if(GetPVarInt(playerid, "ReportBanned") == 1) {
SendClientMessage(playerid, X11_TOMATO_2, "You are report banned!");
return 1;
}
new input[128],msg[128],targetid;
if(!sscanf(params, "is[128]",targetid,input)) {
if(!IsPlayerConnected(targetid))
return SendClientMessage(playerid,X11_TOMATO_2, "That player isn't connected");
new time = GetPVarInt(playerid, "RequestChatCooldown");
new timenow = gettime();
if(REQUESTCHAT_COOLDOWN-(timenow-time) > 0) {
SendClientMessage(playerid, X11_TOMATO_2, "You must wait before sending another report!");
return 1;
}
SetPVarInt(playerid, "RequestChatCooldown", gettime());
format(msg, sizeof(msg), "Report from [%d]%s Of %s Reason:{EE0000}%s", playerid,GetPlayerNameEx(targetid, ENameType_CharName), GetPlayerNameEx(playerid, ENameType_CharName), input);
ABroadcast(X11_ORANGE, msg, EAdminFlags_All);
AdminLog(playerid, msg);
SendClientMessage(playerid, X11_WHITE, "Your report has been sent to the admins, please be patient and wait until an admin can help you.");
//SendClientMessage(playerid, X11_YELLOW, input);
SetPVarInt(playerid, "SentReport", 1);
SetPVarString(playerid, "ReportText", input);
} else {
SendClientMessage(playerid, X11_WHITE, "USAGE: /report [playerid] [message]");
}
return 1;
}
|
Код:
YCMD:report(playerid, params[], help) {
if(help) {
SendClientMessage(playerid, X11_WHITE, "Used for reporting a player");
return 1;
}
if(GetPVarInt(playerid, "ReportBanned") == 1) {
SendClientMessage(playerid, X11_TOMATO_2, "You are report banned!");
return 1;
}
new input[128],msg[128],targetid;
if(!sscanf(params, "is[128]",targetid,input)) {
if(!IsPlayerConnected(targetid))
return SendClientMessage(playerid,X11_TOMATO_2, "That player isn't connected");
new time = GetPVarInt(playerid, "RequestChatCooldown");
new timenow = gettime();
if(REQUESTCHAT_COOLDOWN-(timenow-time) > 0) {
SendClientMessage(playerid, X11_TOMATO_2, "You must wait before sending another report!");
return 1;
}
SetPVarInt(playerid, "RequestChatCooldown", gettime());
format(msg, sizeof(msg), "Report from [%d]%s Of %s Reason:{EE0000}%s", playerid,GetPlayerNameEx(targetid, ENameType_CharName), GetPlayerNameEx(playerid, ENameType_CharName), input);
ABroadcast(X11_ORANGE, msg, EAdminFlags_All);
AdminLog(playerid, msg);
SendClientMessage(playerid, X11_WHITE, "Your report has been sent to the admins, please be patient and wait until an admin can help you.");
//SendClientMessage(playerid, X11_YELLOW, input);
SetPVarInt(playerid, "SentReport", 1);
SetPVarString(playerid, "ReportText", input);
} else {
SendClientMessage(playerid, X11_WHITE, "USAGE: /report [playerid] [message]");
}
return 1;
}
|
YCMD:report(playerid, params[], help)
{
if(help)
{
SendClientMessage(playerid, X11_WHITE, "Used for reporting a player");
}
else
{
new targetid;
new reason[57];
new message[144];
if(GetPVarInt(playerid, "ReportBanned"))
{
SendClientMessage(playerid, X11_TOMATO_2, "You are report banned!");
return 1;
}
if(sscanf(params, "is[57]", targetid, reason))
{
SendClientMessage(playerid, X11_WHITE, "USAGE: /report [playerid] [reason]");
return 1;
}
if(!IsPlayerConnected(targetid))
{
SendClientMessage(playerid,X11_TOMATO_2, "That player isn't connected");
return 1;
}
if(REQUESTCHAT_COOLDOWN - (gettime() - GetPVarInt(playerid, "RequestChatCooldown")) > 0)
{
SendClientMessage(playerid, X11_TOMATO_2, "You must wait before sending another report!");
return 1;
}
SetPVarInt(playerid, "RequestChatCooldown", gettime());
format(message, sizeof(message), "Report from [%d]%s of %s Reason: {EE0000}%s", playerid, GetPlayerNameEx(playerid, ENameType_CharName), GetPlayerNameEx(targetid, ENameType_CharName), reason);
ABroadcast(X11_ORANGE, message, EAdminFlags_All);
AdminLog(playerid, message);
SendClientMessage(playerid, X11_WHITE, "Your report has been sent to the admins, please be patient and wait until an admin can help you.");
}
return 1;
}
|
PHP код:
|
, will follow that.. and thanks again +REP