public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, "JustCreatedHouse") == 0)
{
format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]);
ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
break;
}
}
if(dialogid == dialogid && response == 1) { if(inputtext[0] == '1') { // do what you want } else if(inputtext[0] == '2') { // do what you want } return 1; }
public OnPlayerText(playerid, text[])
{
if(IsPlayerUsingTextDraw[playerid] = true) //You have to create this bool yourself and assign value when appropriate
{
if(strcmp(text, "1", false)) //Here we are checking if " 1 " and text are equal.
{
//do here what you want.
}
return 0; // prevent the text to be put in the chat
}
}
public OnPlayerEnterDynamicCP(playerid, checkpointid) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { new string[256], tmpstring[50]; foreach(Houses, h) { if(checkpointid == HouseCPOut[h]) { SetPVarInt(playerid, "LastHouseCP", h); if(!strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE)) { SetPlayerHouseInterior(playerid, h); ShowInfoBoxEx(playerid, COLOUR_INFO, I_HMENU); break; } format(tmpstring, sizeof(tmpstring), "HouseKeys_%d", h); if(GetPVarInt(playerid, tmpstring) == 1) { SetPlayerHouseInterior(playerid, h); break; } if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE)) { if(hInfo[h][HousePassword] == udb_hash("INVALID_HOUSE_PASSWORD")) { switch(hInfo[h][ForSale]) { case 0: ShowInfoBox(playerid, LABELTEXT2, hInfo[h][HouseName], hInfo[h][HouseOwner], hInfo[h][HouseValue], h); case 1: { switch(hInfo[h][HousePrivacy]) { case 0: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In", "Select", "Cancel"); case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In\nEnter House", "Select", "Cancel"); } } } break; } if(hInfo[h][HousePassword] != udb_hash("INVALID_HOUSE_PASSWORD")) { switch(hInfo[h][ForSale]) { case 0: { switch(hInfo[h][HousePrivacy]) { case 0: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Enter House Using Password\nBreak In", "Select", "Cancel"); case 1: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Enter House Using Password\nBreak In\nEnter House", "Select", "Cancel"); } } case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In\nEnter House", "Select", "Cancel"); } break; } } if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, "JustCreatedHouse") == 0) { format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]); ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel"); break; } } if(checkpointid == HouseCPInt[h]) { switch(GetPVarInt(playerid, "HousePreview")) { case 0: ExitHouse(playerid, h); #if GH_HINTERIOR_UPGRADE == true case 1: { GetPVarString(playerid, "HousePrevName", tmpstring, 50); format(string, sizeof(string), HMENU_BUY_HINTERIOR, tmpstring, GetPVarInt(playerid, "HousePrevValue")); ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel"); } #endif } break; } } } return 1; } |
function HouseVisiting(playerid) { new string[200], tmpstring[50]; GetPVarString(playerid, "HousePrevName", tmpstring, 50); format(string, sizeof(string), I_HINT_VISIT_OVER, tmpstring, GetPVarInt(playerid, "HousePrevValue")); ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel"); return 1; } |
there any esey way to change it like dialog ? with out problem and error!!!
|