Report
#1

Hi, how can i make a Report Command only for Cops.. i mean if a player want to send a message to cops..

I only have /report to all admins, but how can i make this for only cops?

this is my report command

if(strcmp(cmd, "/report", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /report [text]");
return 1;
}
format(string, sizeof(string), "Report von %s[%d]: %s. (%d-%d-%d)", sendername, playerid, (result),month,day,year);
ABroadCast(COLOR_SACBLUE,string,1);
ReportLog(string);
SendClientMessage(playerid, COLOR_SACBLUE, "»» Vielen Dank fьr deinen Report.");
}
return 1;
}
Reply
#2

add in the commands : If gteam = COPS... this just an example
Reply
#3

use [pawn] or [ code ] brackets to make the code more readable like this

Код:
public OnGameModeInIt
{
  return 1;
}
Reply
#4

Quote:
Originally Posted by Noredine
add in the commands : If gteam = COPS... this just an example
and then?
Reply
#5

Quote:
Originally Posted by MaNiii
Quote:
Originally Posted by Noredine
add in the commands : If gteam = COPS... this just an example
and then?
if you really scripted all this you should know how to do this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)