CMD:report(playerid, params[])
{
new reason[50], giveplayerid, sendername[24], str3[128], PlayerName[24], file[128];
if(sscanf(params, "us[32]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [playerid] [reason]");
if(!IsPlayerConnected(giveplayerid)) return 1;
GetPlayerName(playerid, sendername, 20);
GetPlayerName(giveplayerid, PlayerName, sizeof(PlayerName));
format(file, 128, USER_FILE, PlayerName);
format(str3, 128, "%s reported by: %s Reason: %s",PlayerName, sendername, reason);
SendClientMessage(playerid, 0xFFFFFFFF, "thanks for reporting");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetAdminLevel(playerid) >= 1|| IsPlayerAdmin(playerid))
SendClientMessage(i, COLOR_RED, str3);
}
}
return 0;
}
CMD:report(playerid, params[])
{
new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], str[128], reason, iD;
if (sscanf(params, "dz", iD, reason)) return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/report [ID] [Reason]");
if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "This Player is not online.");
if (playerid == iD) return SendClientMessage(playerid, COLOR_RED, "You can't report yourself.");
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(iD, aName, sizeof(aName));
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
new zName[MAX_PLAYER_NAME], pFile[256];
GetPlayerName(i, zName, sizeof(zName));
format(pFile, sizeof(pFile), "Users\%s.ini", zName); //not needed but leave it there to avoid errors
if (IsPlayerAdmin(i) || dini_Int(pFile, "AdminLevel") >= 1)
{
format(str, sizeof(str), "%s(%d) has reported %s(%d) for: %s", pName, playerid, aName, iD, reason);
SendClientMessage(i, COLOR_LEMON, str);
}
}
}
return 1;
}
|
the problem isn't on the colors ... the problem is that the report can't be sent to admins
|
|
This forum requires that you wait 120 seconds between posts. Please try again in 94 seconds. Haters Gonna Hate FUU |
|
thanks you then ! i'm gonna try it for now if it works i'll not post in this topic
![]() |
SendClientMessage(playerid, COLOR, "YOUR TEXT.");
format(str, sizeof(str), "%s(%d) has reported %s(%d) for: %s", pName, playerid, aName, iD, reason);
SendClientMessage(i, COLOR_LEMON, str);
thanks a lot for your help i appreciate it
|
yeah i know how to scrip that . i just don't knew wher the problem came from
thanks a lot for your help i appreciate it |