Garsino House System - help
#2

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{

    if (
newkeys == KEY_SECONDARY_ATTACK)
    {

    if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new 
string[256], tmpstring[50];
        foreach(
Housesh)
        {
            if(
pickupid == HousePickupOut[h])
            {
                
SetPVarInt(playerid"LastHouseCP"h);
                if(!
strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE))
                {
                    
SetPlayerHouseInterior(playeridh);
                    
ShowInfoBoxEx(playeridCOLOUR_INFOI_HMENU);
                    break;
                }
                
format(tmpstringsizeof(tmpstring), "HouseKeys_%d"h);
                if(
GetPVarInt(playeridtmpstring) == 1)
                {
                    
SetPlayerHouseInterior(playeridh);
                    break;
                }
                if(
strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAMECASE_SENSETIVE))
                {
                    if(
hInfo[h][HousePassword] == udb_hash("INVALID_HOUSE_PASSWORD"))
                    {
                        switch(
hInfo[h][ForSale])
                        {
                            case 
0ShowInfoBox(playeridLABELTEXT2hInfo[h][HouseOwner], hInfo[h][HouseValue], h);
                            case 
1:
                            {
                                switch(
hInfo[h][HousePrivacy])
                                {
                                    case 
0ShowPlayerDialog(playeridHOUSEMENU+23DIALOG_STYLE_LISTINFORMATION_HEADER"Buy House (Step 1)\nBreak In""Select""Cancel");
                                    case 
1ShowPlayerDialog(playeridHOUSEMENU+23DIALOG_STYLE_LISTINFORMATION_HEADER"Buy House (Step 1)\nBreak In\nEnter House""Select""Cancel");
                                }
                            }
                        }
                        break;
                    }
                }
                if(!
strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAMECASE_SENSETIVE) && hInfo[h][HouseValue] > && GetPVarInt(playerid"JustCreatedHouse") == 0)
                {
                    
format(stringsizeof(string), HMENU_BUY_HOUSEhInfo[h][HouseValue]);
                    
ShowPlayerDialog(playeridHOUSEMENU+4DIALOG_STYLE_MSGBOXINFORMATION_HEADERstring"Buy""Cancel");
                    break;
                }
            }
            if(
pickupid == HousePickupInt[h])
            {
                switch(
GetPVarInt(playerid"HousePreview"))
                {
                    case 
0ExitHouse(playeridh);
                    
#if GH_HINTERIOR_UPGRADE == true
                    
case 1:
                    {
                        
GetPVarString(playerid"HousePrevName"tmpstring50);
                        
format(stringsizeof(string), HMENU_BUY_HINTERIORtmpstringGetPVarInt(playerid"HousePrevValue"));
                        
ShowPlayerDialog(playeridHOUSEMENU+17DIALOG_STYLE_MSGBOXINFORMATION_HEADERstring"Buy""Cancel");
                    }
              
#endif
                
}
                break;
            }
        }
    }
    return 
1;

NOTE: NOT TESTED.
Reply


Messages In This Thread
Garsino House System - help - by Saddin - 30.12.2012, 08:06
Re: Garsino House System - help - by ikbenremco - 30.12.2012, 09:21
Re: Garsino House System - help - by Threshold - 30.12.2012, 09:56
Re: Garsino House System - help - by Saddin - 30.12.2012, 11:20
Re: Garsino House System - help - by Threshold - 30.12.2012, 22:21
Re: Garsino House System - help - by Saddin - 31.12.2012, 21:56

Forum Jump:


Users browsing this thread: 1 Guest(s)