Suspect CMD - Report to cops radio bug
#2

Change this line:

pawn Код:
format(string,sizeof(string),"[POLICE RADIO] Law Enforcement Officer %s(%d) has reported %s(%d) for criminal activity. Reason: %s",PlayerName(playerid),playerid,PlayerName(ID),ID,message);
    SendRadioMessageToCops(copmsg);
    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has reported you. Reason: %s",PlayerName(playerid),playerid,message);
To this:

pawn Код:
format(string,sizeof(string),"[POLICE RADIO] Law Enforcement Officer %s(%d) has reported %s(%d) for criminal activity. Reason: %s",PlayerName(playerid),playerid,PlayerName(ID),ID,cmdreason);
    SendRadioMessageToCops(copmsg);
    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has reported you. Reason: %s",PlayerName(playerid),playerid,cmdreason);
EDIT: I was on my phone so I was lazy to do the whole thing but I've fixed it up, let me know if it works

pawn Код:
dcmd_suspect(playerid,params[])
{
    new string[128];
    new ID;
    new cmdreason[128];
    if(sscanf(params, "us[128]", ID, cmdreason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"USAGE: /suspect (Player Name/ID) (Reason)");
        return 1;
    }
    if(IsSpawned[playerid] != 1)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
        return 1;
    }
    if(gTeam[playerid] != COP && gTeam[playerid] != SWAT && gTeam[playerid] != FBI && gTeam[playerid] != ARMY)
    {
        SendClientMessage(playerid,COLOR_ERROR,"Only law enforcement can report criminals on the police radio.");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot report them",ID);
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    if(gTeam[ID] == COP|| gTeam[ID] == SWAT || gTeam[ID] == FBI || gTeam[ID] == ARMY)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You cannot report other law enforcement on the police radio. I'm sure they done nothing wrong.");
        return 1;
    }
    if(playerid == ID)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You cannot report yourself down the police radio. Why would you even want to do that.");
        return 1;
 }
    format(string,sizeof(string),"[POLICE RADIO] Law Enforcement Officer %s(%d) has reported %s(%d) for criminal activity. Reason: %s",PlayerName(playerid),playerid,PlayerName(ID),ID,cmdreason);
    SendRadioMessageToCops(string);
    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has reported you. Reason: %s",PlayerName(playerid),playerid,cmdreason);
    SendClientMessage(ID,COLOR_ROYALBLUE,string);
    IncreaseWantedLevel(ID,1);
    IncreasePlayerScore(playerid,1);
    return 1;
}
Reply


Messages In This Thread
Suspect CMD - Report to cops radio bug - by Uberanwar - 17.08.2013, 10:59
Re: Suspect CMD - Report to cops radio bug - by BossZk - 17.08.2013, 11:02
Re: Suspect CMD - Report to cops radio bug - by dominik523 - 17.08.2013, 11:05
Re: Suspect CMD - Report to cops radio bug - by Kells - 17.08.2013, 11:07

Forum Jump:


Users browsing this thread: 1 Guest(s)