2 Questions.
#1

Hello,

Does anyone have the /mdc [id] command to view why the player has been given a star? for zcmd.

And

Is there a way to make camera's work, say if you put one on the bank, you can spec that camera?

Thanks in Advance.
Reply
#2

2nd- yes, using SetPlayerCameraPos and SetPlayerCameraLookAt
Reply
#3

Explain what do you mean by /mdc [id]. What it does
Reply
#4

thanks for the 1st post and
@Kostas' , right say if an officer /su(spect) someone they get a star (already got this command) when you do /wanted it only shows how many stars they got.. and It dosen't tell you WHY they got it, So say if you pull them over and you ask them for their ID, you go to the car and type /mdc [id] and it tells you why they got the star:

/su 0 Evasion...................................... later on: /mdc 0 Wanted for: Evasion. something like that
Reply
#5

show us your /suspect command.
Reply
#6

@pharrel If I was to make a command /camerabank I would do

Код:
CMD:camerabank
SetPlayerCameraPos(playerid, THE COORDS OF THE CAMERA);
Not like that but yano.

EDIT: Here you go
Код:
CMD:su(playerid, params[]) {

	new
		targetID,
		string[128],
		crime[96],
		playerName[2][MAX_PLAYER_NAME];

	if(sscanf(params, "us", targetID, crime)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/su [playerid] [offence]");

	else if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
		if(IsPlayerConnectedEx(targetID)) {
			if(groupVariables[playerVariables[targetID][pGroup]][gGroupType] != 1) {

				GetPlayerName(playerid, playerName[0], MAX_PLAYER_NAME);
				GetPlayerName(targetID, playerName[1], MAX_PLAYER_NAME);

				format(string, sizeof(string), "Dispatch: %s has issued an arrest warrant on %s (%s).", playerName[0], playerName[1], crime);
				SendToGroup(playerVariables[playerid][pGroup], COLOR_RADIOCHAT, string);

				playerVariables[targetID][pWarrants]++;
				if(playerVariables[targetID][pWarrants] < 7)
					SetPlayerWantedLevel(targetID, playerVariables[targetID][pWarrants]);
			}
			else SendClientMessage(playerid, COLOR_GREY, "You can't place an arrest warrant on this person.");
		}
		else SendClientMessage(playerid, COLOR_GREY, "The specified player is either not connected or has not authenticated.");
	}
	return 1;
}
Reply
#7

Quote:
Originally Posted by Jordiee
@pharrel If I was to make a command /camerabank I would do

Code:
CMD:camerabank
SetPlayerCameraPos(playerid, THE COORDS OF THE CAMERA);
Not like that but yano.
In theory yes but probably the camera will mess up the view, use JernejL's Map Editor with that you can take the exactly coordinates.

pawn Код:
//on the playerVariables enum:
    pCrimeDescription[60 char],

CMD:su(playerid, params[])
{
    new
        targetID,
        string[128],
        crime[96],
        playerName[2][MAX_PLAYER_NAME];

    if(sscanf(params, "us", targetID, crime)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/su [playerid] [offence]");

    else if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
        if(IsPlayerConnectedEx(targetID)) {
            if(groupVariables[playerVariables[targetID][pGroup]][gGroupType] != 1) {

                GetPlayerName(playerid, playerName[0], MAX_PLAYER_NAME);
                GetPlayerName(targetID, playerName[1], MAX_PLAYER_NAME);

                format(string, sizeof(string), "Dispatch: %s has issued an arrest warrant on %s (%s).", playerName[0], playerName[1], crime);
                SendToGroup(playerVariables[playerid][pGroup], COLOR_RADIOCHAT, string);

                playerVariables[targetID][pWarrants]++;
                if(playerVariables[targetID][pWarrants] < 7)
                    SetPlayerWantedLevel(targetID, playerVariables[targetID][pWarrants]);
                format(playerVariables[targetID][pCrimeDescription], strlen(crime), crime);
            }
            else SendClientMessage(playerid, COLOR_GREY, "You can't place an arrest warrant on this person.");
        }
        else SendClientMessage(playerid, COLOR_GREY, "The specified player is either not connected or has not authenticated.");
    }
    return 1;
}

CMD:mdc(playerid)
{
    new string[128];
    SendClientMessage(playerid, -1, "Suspects List:");
    foreach(Player, i)
    {
        if(playerVariables[i][pWarrants] > 0)
        {
            format(string, 128, "Suspect: %s | Crime: %s", PlayerName,playerVariables[i][pCrimeDescription]);
            SendClientMessage(playerid, -1, string);
        }
    }
    return 1;
}
Reply
#8

Thanks, but it gives this error and I can't work it out:
Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(9940) : error 017: undefined symbol "PlayerName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
EDIT: Also sorry but how would you make this only work if you was in a PD car?
Reply
#9

pawn Код:
CMD:mdc(playerid)
{
    new string[128], PlayerName[MAX_PLAYER_NAME];
    SendClientMessage(playerid, -1, "Suspects List:");
    foreach(Player, i)
    {
        if(playerVariables[i][pWarrants] > 0)
        {
            format(string, 128, "Suspect: %s | Crime: %s", PlayerName,playerVariables[i][pCrimeDescription]);
            SendClientMessage(playerid, -1, string);
        }
    }
    return 1;
}
Reply
#10

everytime I try to add both those commands:
the vx-rp.amx gets deleted. :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)