Need help with this cmd
#1

when someone use report that this report everyone can see i want it to only see admins can someone fix this cmd i will give him repution

CMD:report(playerid, params[]) {
new id;
new reason[128];
if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "[SERVER] - USAGE: /report [ID] [REASON]");
new string[150], sender[MAX_PLAYER_NAME], receiver[MAX_PLAYER_NAME];
GetPlayerName(playerid, sender, sizeof(sender));
GetPlayerName(id, receiver, sizeof(receiver));
format(string, sizeof(string), "[ADMIN] - %s(%d) has reported %s(%d)", sender, playerid, receiver, id);
SendMessageToAdmins(string);
format(string, sizeof(string), "[ADMIN] - Reason: %s", reason);
SendMessageToAdmins(string);
SendClientMessage(playerid, COLOR_ORANGE, "Your report has been sent.");
return 1;
}
Reply
#2

Show us your "SendMessageToAdmins" function.
Reply
#3

Show me the define or the enum, function whatever, which is tolerated with the administration system.
Reply
#4

in the SendMessageToAdmins function, it should Send a message to the online admins.
Reply
#5

Could you copy your function in here? We've got no clue what it is, and if the mistake is in there.
Reply
#6

here is
stock SendMessageToAdmins(message[])
{
new pCount;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if((Player[i][Level] >= 1) || !IsPlayerAdmin(i)) continue;
pCount++;
SendClientMessage(i, 0x00FF00AA, message);
}
CallLocalFunction("OnMessageToAdminsSent", "sd", message, pCount); //<-- !!!
return 1;
}
Reply
#7

Don't you have a duty for admins?
Reply
#8

duty ? like spec something
Reply
#9

No.. As-in

PHP код:
AdminDuty == 
To declare if an admin is on-duty yes or no ( depends on how you defined the function to check if he/she is on-duty ).
Reply
#10

no there is no any adminduty == 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)