Hey Kin, thanks.
Mobile Data Computer - thats what the input will be for.
After you type his name you need to search for example the player's registered houses
lemme show you an example
pawn Code:
COMMAND:MDCtest(playerid, params[])
{
if(IsPlayerFED(playerid) || PlayerInfo[playerid][power] >= 10)
{
new carid = GetPlayerNearestVehicle(playerid);
if(GetDistanceFromPlayerToVehicle(playerid, carid) > 8.0) return SendClientError(playerid, "You must be inside a PD vehicle or outside it to use the MDC!");
if(Vehicles[carid][carteam]==COPS || Vehicles[carid][carteam]==SASF || Vehicles[carid][carteam]==FBI)
{
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_LIST, "LSPD Mobile Data Computer", "\
Registered houses\n\
Registered businesses\n\
Registered vehicles\n\
Registered phone\n\
Pervious convictions", "Select", "Select");
}
}
else return SendClientError(playerid, CANT_USE_CMD);
return 1;
}
this is the dilaog response --
pawn Code:
if(dialogid == 201 && response == 1)
{
if(!PlayerInfo[playerid][power]) return SendClientError(playerid, CANT_USE_CMD);
new iName[MAX_PLAYER_NAME];
if( sscanf ( params, "s", iName) || strlen(params) > MAX_PLAYER_NAME) return SCP(playerid, "[Name]");
SendClientMessage(playerid, COLOR_HELPEROOC, "=====================================================");
SendClientMSG(playerid, COLOR_HELPEROOC, "- HOUSES which have \"%s\" as owner:", iName);
new tmp2[ 30 ];
for(new i; i < sizeof(House); i++)
{
format(iStr, sizeof(iStr), "Casa%d.txt", i);
if(strcmp(House[i][tmpowner], iName, false)) continue;
SendClientMSG(playerid, COLOR_LIGHTGREY, " HouseID[%d] Owner[%s] Till[$%d]", i, iName, dini_Int(tmp2, "till"));
}
SendClientMessage(playerid, COLOR_HELPEROOC, "=====================================================");
return 1;
}
else if(dialogid == 201 && response == 0) return SendClientMessage(playerid, COLOR_RED, "Cancelled.");
Havent tested it yet It wont work probably I'm working on it right now.