Need finding a name using DIalog input! mysql!
#1

hi guys i have been trying to make an mdc system

I got one example but it uses diff system

So I want to pretty much translate this to dialog type

Код:
(strcmp(cmd, "/mdc", true) == 0)
	{
	    if(PlayerInfo[playerid][pMember] != 1)
	    {

			SendClientMessage(playerid, COLOR_GREY, "   You must be an LSPD member!");
			return 1;
	    }
		new tmpcar = GetPlayerVehicleID(playerid);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
            ShowPlayerDialog(playerid,DIALOG_MDC,DIALOG_STYLE_LIST,"Mobile Data Computer","{33FF66}Search User\n{33FF66}Search Plate","Select", "");
		//	SendClientMessage(playerid, COLOR_GRAD2, "{33CCFF}USAGE:{FFFFFF} /mdc [playerid/PartOfName]");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
	    GetPlayerName(giveplayerid, sendername, sizeof(sendername));
        GiveNameSpace(sendername);
		if(!IsACopCar(tmpcar) && !IsASheriffCar(tmpcar) && !IsAnFbiCar(tmpcar))
		{
			SendClientMessage(playerid, COLOR_GRAD2, " You are not in a police Vehicle");
			return 1;
		}
	//	ShowPlayerDialog(playerid,DIALOG_MDC,DIALOG_STYLE_LIST,"Mobile Data Computer","{33FF66}Search User\n{33FF66}Search Plate","Select", "");
		SendClientMessage(playerid, TEAM_BLUE_COLOR,"          MOBILE DATA COMPUTER          ");
        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
		format(string, 256, "Name: %s", sendername);
		SendClientMessage(playerid, COLOR_WHITE, string);
		format(string, 256, "Wanted Risk: %d", WantedLevel[giveplayerid]);
		SendClientMessage(playerid, COLOR_WHITE, string);
		if(PlayerInfo[giveplayerid][pHousekey] != 255)
	    {
            format(string, sizeof(string), "   Address: %s ((HouseID: %d))", HouseInfo[PlayerInfo[giveplayerid][pHousekey]][hDiscription], PlayerInfo[giveplayerid][pHousekey]);
	        SendClientMessage(playerid, COLOR_WHITE, string);
	    }
		if(PlayerInfo[giveplayerid][pArrested] > 0)
		{
		    SendClientMessage(playerid, COLOR_WHITE, "Criminal Record: True");
		    format(string, 256, "Crimes Commited: %d", PlayerInfo[giveplayerid][pCrimes]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		    format(string, 256, "Times Arrested: %d", PlayerInfo[giveplayerid][pArrested]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}else {
		    SendClientMessage(playerid, COLOR_WHITE, "Criminal Record: None");
		}
		if(PlayerInfo[giveplayerid][pWarrant]==1) {
		    format(string, 256, "Warrant Issued: %s", PlayerInfo[giveplayerid][pWarrantReason]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
		if(PlayerInfo[giveplayerid][pTicket][0] > 0)
		{
		    format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][0], PlayerInfo[giveplayerid][pTicketReason0]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		    format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate0]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
		if(PlayerInfo[giveplayerid][pTicket][1] > 0)
		{
		    format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][1], PlayerInfo[giveplayerid][pTicketReason1]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		    format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate1]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
		if(PlayerInfo[giveplayerid][pTicket][2] > 0)
		{
		    format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][2], PlayerInfo[giveplayerid][pTicketReason2]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		    format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate2]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
		if(PlayerInfo[giveplayerid][pTicket][3] > 0)
		{
		    format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][3], PlayerInfo[giveplayerid][pTicketReason3]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		    format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate3]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
		if(PlayerInfo[giveplayerid][pTicket][4] > 0)
		{
		    format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][4], PlayerInfo[giveplayerid][pTicketReason4]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		    format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate4]);
		    SendClientMessage(playerid, COLOR_WHITE, string);
		}
		if(PlayerInfo[giveplayerid][pAge] > 0 && GetPlayerSkin(giveplayerid) > 0)
		{
		    format(string, 256, "Age: %d | Clothes: %d", PlayerInfo[giveplayerid][pAge], GetPlayerSkin(giveplayerid));
			SendClientMessage(playerid, COLOR_WHITE, string);
		}
		SendClientMessage(playerid, TEAM_BLUE_COLOR,"_______________________________________");
		return 1;
	}
this shows me everything correctly but i want to transfer this to dialogs like this This does only on SendClientMessage but I want it on Dialogs

> When someone types /mdc -> It shows them dialog with this option "search user"
and When someone clicks Search User, We use DIALOG_STYLE_INPUT for that and put exact name like for example
Jason_Turkey
After they do serch button on Jason Turkey
I want four DIALOG_STYLE_LIST showing them
> personal information
When they click personal information it shows their name/age/gender
> Address
shows the house id/name
> ticket list
The ticket they got

Its all mysql based I tried myself couldn't seem to get it working hope someone helps me!
Reply


Messages In This Thread
Need finding a name using DIalog input! mysql! - by JasonTurkey - 27.10.2013, 04:16
Re: Need finding a name using DIalog input! mysql! - by rickisme - 27.10.2013, 04:25
Re: Need finding a name using DIalog input! mysql! - by JasonTurkey - 27.10.2013, 06:35
Re: Need finding a name using DIalog input! mysql! - by Scrillex - 27.10.2013, 06:48
Re: Need finding a name using DIalog input! mysql! - by JasonTurkey - 27.10.2013, 07:29

Forum Jump:


Users browsing this thread: 1 Guest(s)