/ar command error:
#1

warning 213: tag mismatch
warning 209: function "cmd_ar" should return a value
error 010: invalid function or declaration

pawn Код:
CMD:ar(playerid,params[])
{
    new id,n[MAX_PLAYER_NAME], on[MAX_PLAYER_NAME];
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_CIV)
    {
        SendClientMessage(playerid,red,"Only law enforcement can arrest wanted suspects.");
        return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,ID) > 4)
    {
        new string2[128];
        format(string2,sizeof(string2),"%s(%d) is too far away. You cannot reach him to arrest him.",on,id);
        SendClientMessage(playerid,red,string2);
        return 1;
    }
    if(GetPlayerState(ID) == PLAYER_STATE_DRIVER || GetPlayerState(ID) == PLAYER_STATE_PASSENGER)
    {
        SendClientMessage(playerid,red,"You cannot arrest a suspect they are in a vehicle. Get them to exit the vehicle first.");
        return 1;
    }
    if(GetPlayerWantedLevel(ID) < 3)
    {
        new string4[128];
        format(string4,sizeof(string4),"%s(%d)'s wanted level is too low. You cannot jail them. Use /ticket (Player ID).",n,playerid);
        SendClientMessage(playerid,red,string4);
        return 1;
    }
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't arrest a suspect if you are in a vehicle.");
    if(IsSpawned[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"You can't use this command when you are dead or spawning.");
    if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "Invalid Player ID.");
    if(playerid == id) return SendClientMessage(playerid,red, "You cannot arrest yourself.");
    if(sscanf(params,"uz",id)) return SendClientMessage(playerid,red,"Usage:/ar [ID]");
    else
    {
    GetPlayerName(playerid,n,sizeof(n));
    GetPlayerName(id,on,sizeof(on));
    new string[100];
    format(string,sizeof(string),"You've arrested %s(%d).",n,id);
    SendClientMessage(playerid,blue,string);
    new string2[128];
    format(string2, sizeof(string), "%s has been arrested by %s",n,playerid,on,id);
    SendClientMessageToAll(red,string2);
    }
    }
        return true;
}
What's wrong?
Reply


Messages In This Thread
/ar command error: - by Face9000 - 14.02.2012, 14:43
Re: /ar command error: - by ArmyOps - 14.02.2012, 14:56
Re: /ar command error: - by Face9000 - 14.02.2012, 15:08
Re: /ar command error: - by Face9000 - 15.02.2012, 19:52
Re: /ar command error: - by Twisted_Insane - 15.02.2012, 20:08
Re: /ar command error: - by Konstantinos - 15.02.2012, 20:15
Re: /ar command error: - by Face9000 - 15.02.2012, 20:53
AW: /ar command error: - by Tigerkiller - 15.02.2012, 20:59
Re: /ar command error: - by Twisted_Insane - 15.02.2012, 21:01
Re: /ar command error: - by Face9000 - 15.02.2012, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)