/mdc bug
#1

This /mdc command is giving me an: "Unknown Command" response when I use it.
Can't remember if the command worked when I first downloaded the gamemode but I have not changed it.

The command only gives you the Unknown Command message when you are in a police car or at the MDC spot.
If you aren't in a car it gives you the correct response telling you to be inside a car.
Also, when you choose a playerid that isn't being used it gives you the "Player is offline message."


Код:
	if(strcmp(cmd, "/mdc", true) == 0) //DIALOG MDC
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!IsACop(playerid) && !IsASoldier(playerid) && !IsASWAT(playerid) && !IsAnAgent(playerid))
	        {
	            SendClientMessage(playerid, GREY, "    You are not a member of the law enforcement.");
	            return 1;
	        }
	        new mdcstring[1024];
	        new location[MAX_ZONE_NAME];
	        new location2[MAX_ZONE_NAME];
			new tmpcar = GetPlayerVehicleID(playerid);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SyntaxMessage(playerid, "/mdc [playerid/name]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsACopCar(tmpcar) || IsAFBICar(tmpcar) || IsPlayerInRangeOfPoint(playerid,100.0,253.9280,69.6094,1003.6406))
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
				        GetPlayer2DZone(giveplayerid, location, MAX_ZONE_NAME);
				        new wanted = 0,hashome = 0,crimes = 0;
						if(PlayerInfo[giveplayerid][pWantedLevel] > 0)
						{
							wanted = 1;
						}
						if(HouseKey[giveplayerid] != -1 || HouseKey2[giveplayerid] != -1)
						{
							hashome = 1;
						}
                        if(PlayerInfo[giveplayerid][pCrimes] > 0)
						{
							crimes = 1;
						}
				        if(wanted == 1 && hashome == 0)
				        {
				            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
							sendername,
							PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
							PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
							PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
							PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
							PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
							PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
							PlayerInfo[giveplayerid][pCrimes],
							PlayerInfo[giveplayerid][pArrested]);
				        }
				        if(wanted == 1 && hashome == 1)
						{
							Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
							Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
						    format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
							sendername,
							PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
							PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
							PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
							PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
							PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
							PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
							location,
							location2,
							PlayerInfo[giveplayerid][pCrimes],
							PlayerInfo[giveplayerid][pArrested]);
						}
				        if(wanted == 0 && hashome == 0 && crimes == 1)
				        {
				            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
							sendername,
							PlayerInfo[giveplayerid][pCrimes],
							PlayerInfo[giveplayerid][pArrested]);
				        }
				        if(wanted == 0 && hashome == 1 && crimes == 0)
				        {
							Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
							Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
				            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: No",
							sendername,
							location,
							location2);
				        }
				        if(wanted == 0 && hashome == 0 && crimes == 0)
				        {
				            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: No",
							sendername);
				        }
				        if(wanted == 0 && hashome == 1 && crimes == 1)
				        {
							Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
							Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
				            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes Committed: %d\nTimes Arrested: %d",
							sendername,
							location,
							location2,
							PlayerInfo[giveplayerid][pCrimes],
							PlayerInfo[giveplayerid][pArrested]);
				        }
				        ShowPlayerDialog(playerid,667,DIALOG_STYLE_MSGBOX,"Mobile Data Computer",mdcstring,"Ok","Cancel");
					}
				}
				else
				{
				    SendClientMessage(playerid, GREY, "    That player is offline.");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, GREY, "    You are not in a Police Vehicle or in the Police Department.");
				return 1;
			}
		}
		return 1;
	}
Reply
#2

Try This,
pawn Код:
if(strcmp(cmdtext, "/mdc", true) == 0) //DIALOG MDC
    {
        if(IsPlayerConnected(playerid))
        {
            if(!IsACop(playerid) && !IsASoldier(playerid) && !IsASWAT(playerid) && !IsAnAgent(playerid))
            {
                SendClientMessage(playerid, GREY, "    You are not a member of the law enforcement.");
                return 1;
            }
            new mdcstring[1024];
            new location[MAX_ZONE_NAME];
            new location2[MAX_ZONE_NAME];
            new tmpcar = GetPlayerVehicleID(playerid);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SyntaxMessage(playerid, "/mdc [playerid/name]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsACopCar(tmpcar) || IsAFBICar(tmpcar) || IsPlayerInRangeOfPoint(playerid,100.0,253.9280,69.6094,1003.6406))
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
                        GetPlayer2DZone(giveplayerid, location, MAX_ZONE_NAME);
                        new wanted = 0,hashome = 0,crimes = 0;
                        if(PlayerInfo[giveplayerid][pWantedLevel] > 0)
                        {
                            wanted = 1;
                        }
                        if(HouseKey[giveplayerid] != -1 || HouseKey2[giveplayerid] != -1)
                        {
                            hashome = 1;
                        }
                        if(PlayerInfo[giveplayerid][pCrimes] > 0)
                        {
                            crimes = 1;
                        }
                        if(wanted == 1 && hashome == 0)
                        {
                            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
                            sendername,
                            PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
                            PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
                            PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
                            PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
                            PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
                            PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
                            PlayerInfo[giveplayerid][pCrimes],
                            PlayerInfo[giveplayerid][pArrested]);
                        }
                        if(wanted == 1 && hashome == 1)
                        {
                            Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
                            Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
                            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
                            sendername,
                            PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
                            PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
                            PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
                            PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
                            PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
                            PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
                            location,
                            location2,
                            PlayerInfo[giveplayerid][pCrimes],
                            PlayerInfo[giveplayerid][pArrested]);
                        }
                        if(wanted == 0 && hashome == 0 && crimes == 1)
                        {
                            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
                            sendername,
                            PlayerInfo[giveplayerid][pCrimes],
                            PlayerInfo[giveplayerid][pArrested]);
                        }
                        if(wanted == 0 && hashome == 1 && crimes == 0)
                        {
                            Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
                            Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
                            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: No",
                            sendername,
                            location,
                            location2);
                        }
                        if(wanted == 0 && hashome == 0 && crimes == 0)
                        {
                            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: No",
                            sendername);
                        }
                        if(wanted == 0 && hashome == 1 && crimes == 1)
                        {
                            Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
                            Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
                            format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes Committed: %d\nTimes Arrested: %d",
                            sendername,
                            location,
                            location2,
                            PlayerInfo[giveplayerid][pCrimes],
                            PlayerInfo[giveplayerid][pArrested]);
                        }
                        ShowPlayerDialog(playerid,667,DIALOG_STYLE_MSGBOX,"Mobile Data Computer",mdcstring,"Ok","Cancel");
                    }
                }
                else
                {
                    SendClientMessage(playerid, GREY, "    That player is offline.");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, GREY, "    You are not in a Police Vehicle or in the Police Department.");
                return 1;
            }
        }
        return 1;
    }
and/or

I suggest to you to use ZCMD Command Processor;

First of all,

ZCMD:
[Include] zcmd 0.3.1 | Fast & Simple Command Processor (updated 30/10/2009)

Check your "PAWNO > includes" Directory, and Look for "zcmd.inc",

If you don't have "zcmd.inc",

(NOTE: Make sure you open the same PAWNO that contains all your stuff)

Download it here,

[Include] zcmd 0.3.1 | Fast & Simple Command Processor (updated 30/10/2009)
SolidFiles for ZCMD 0.3.1

Installation:
  1. Copy the whole include codes in Notepad, Wordpad, etc..
  2. Save it as "include's name.inc", and Save it in "PAWNO > include".
  3. Open your Gamemode Script using PAWNO Compiler.
  4. Add "#include <include's name>" at the Top of your Gamemode Script.
  5. Compile it, Save it, and Finish.
and/or
  1. Download the Include File, Copy it.
  2. Paste it in "PAWNO > include".
  3. Open your Gamemode Script using PAWNO Compiler.
  4. Add "#include <include's name>" at the Top of your Gamemode Script.
  5. Compile it, Save it, and Finish.
Now, Try This One:

Include,
Код:
#include <zcmd>
MDC Command's Code,
pawn Код:
CMD:mdc(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(!IsACop(playerid) && !IsASoldier(playerid) && !IsASWAT(playerid) && !IsAnAgent(playerid))
        {
            SendClientMessage(playerid, GREY, "    You are not a member of the law enforcement.");
            return 1;
        }
        new mdcstring[1024];
        new location[MAX_ZONE_NAME];
        new location2[MAX_ZONE_NAME];
        new tmpcar = GetPlayerVehicleID(playerid);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SyntaxMessage(playerid, "/mdc [playerid/name]");
            return 1;
        }
        giveplayerid = ReturnUser(tmp);
        if(IsACopCar(tmpcar) || IsAFBICar(tmpcar) || IsPlayerInRangeOfPoint(playerid,100.0,253.9280,69.6094,1003.6406))
        {
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, sendername, sizeof(sendername));
                    GetPlayer2DZone(giveplayerid, location, MAX_ZONE_NAME);
                    new wanted = 0,hashome = 0,crimes = 0;
                    if(PlayerInfo[giveplayerid][pWantedLevel] > 0)
                    {
                        wanted = 1;
                    }
                    if(HouseKey[giveplayerid] != -1 || HouseKey2[giveplayerid] != -1)
                    {
                        hashome = 1;
                    }
                    if(PlayerInfo[giveplayerid][pCrimes] > 0)
                    {
                        crimes = 1;
                    }
                    if(wanted == 1 && hashome == 0)
                    {
                        format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
                        sendername,
                        PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
                        PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
                        PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
                        PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
                        PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
                        PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
                        PlayerInfo[giveplayerid][pCrimes],
                        PlayerInfo[giveplayerid][pArrested]);
                    }
                    if(wanted == 1 && hashome == 1)
                    {
                        Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
                        Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
                        format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\n      - %s | Reporter: %s | Date: %s\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
                        sendername,
                        PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
                        PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
                        PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
                        PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
                        PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
                        PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
                        location,
                        location2,
                        PlayerInfo[giveplayerid][pCrimes],
                        PlayerInfo[giveplayerid][pArrested]);
                    }
                    if(wanted == 0 && hashome == 0 && crimes == 1)
                    {
                        format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
                        sendername,
                        PlayerInfo[giveplayerid][pCrimes],
                        PlayerInfo[giveplayerid][pArrested]);
                    }
                    if(wanted == 0 && hashome == 1 && crimes == 0)
                    {
                        Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
                        Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
                        format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: No",
                        sendername,
                        location,
                        location2);
                    }
                    if(wanted == 0 && hashome == 0 && crimes == 0)
                    {
                        format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: No",
                        sendername);
                    }
                    if(wanted == 0 && hashome == 1 && crimes == 1)
                    {
                        Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
                        Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
                        format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes Committed: %d\nTimes Arrested: %d",
                        sendername,
                        location,
                        location2,
                        PlayerInfo[giveplayerid][pCrimes],
                        PlayerInfo[giveplayerid][pArrested]);
                    }
                    ShowPlayerDialog(playerid,667,DIALOG_STYLE_MSGBOX,"Mobile Data Computer",mdcstring,"Ok","Cancel");
                }
                else
                {
                    SendClientMessage(playerid, GREY, "    That player is offline.");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, GREY, "    You are not in a Police Vehicle or in the Police Department.");
                return 1;
            }
        }
    }
    return 1;
}
Tell me if it isn't working
Reply
#3

I used your first suggestion and the results were:

Nothing happens at all when using /mdc" " or /mdc [number].
If I do "/mdc" with no space or ID then it shows the syntax.

Same results whether I am in the cop car or not.
Reply
#4

make sure all your include files and plugins are in order and updated, use ZCMD as stated above, and lastly make sure u havent added a return 0 anywhere by mistake.
i didnt even see the code as its a downloaded gamemode and u probably have no idea what ur doing.
and if u do know what ur doing, then just do what i said and ull get it working in no time.
cheers
Reply
#5

Quote:
Originally Posted by RayDcosta
Посмотреть сообщение
i didnt even see the code as its a downloaded gamemode and u probably have no idea what ur doing.
and if u do know what ur doing, then just do what i said and ull get it working in no time.
Okay if anyone else actually wants to 'see the code' that I posted in OP then feel free to share some light on this bug. If you don't read the code then don't reply at all.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)