26.10.2009, 17:51
Code:
Code:Code:Yo, here used to be bored here not net: D so I did sort of like the house system: boss: tet still makes includ where buou available cars. _________________________________________________ [/hr] below the top include:_________________________________________________ [/hr]Code:new house1pick / / - Do you pickup where it will house. new house1pick2 / / - Do you pickup in the house way you walk out. new Menu: house1menu / / - Let 'menu for the house. new mdum1a / / - This is the owner of a house that no one will buy nemoch. new mdum1b [MAX_PLAYERS ];//- This is playerid Moch need to unlock the house. new dum1z / / - Protection.
Do OnGameModeInt:
OnPlayerPickUpPick:Code:house1menu = CreateMenu (~ r ~ Houde ", 2, 214.0, 194.0, 250.0, 250.0); AddMenuItem (house1menu, 0, "Buy"); AddMenuItem (house1menu, 0, "Sell"); AddMenuItem (house1menu, 0, "Lock"); AddMenuItem (house1menu, 0, "Unlock"); AddMenuItem (house1menu, 0, "Information"); AddMenuItem (house1menu, 0, "Go to house"); AddMenuItem (house1menu, 0, "None"); / / This is the menu. house1pick2 = CreatePickup (1318,1,235.2655,1186.6844,1080.2578) / / To make pickup house1pick = CreatePickup (1273,1,2071.5552, -1701.3064,13.5469) / / also do pickup / / Pickup
_________________________________________________ [/hr]Code:if (pickupid == house1pick2) ( SetPlayerInterior (playerid, 0) / / This is so vistoupн When he sets the interior 0 SetPlayerPos (playerid, 2071.5552, -1701.3064,13.5469) / / where he was portno ) if (pickupid == house1pick) ( ShowMenuForPlayer (house1menu, playerid); / / - show him the menu. TogglePlayerControllable (playerid, false) / / - freeze him (nepovinй) )
To OnPlayerSelectedMenuRow:
Code:new Menu: Current = GetPlayerMenu (playerid );//- Define the menu (maybe you) if (Current == house1menu) ( switch (row) ( case 0: ( TogglePlayerControllable (playerid, true) / / defrost if (GetPlayerMoney (playerid) <50000) return SendClientMessage (playerid, COLOR_ZELENA, "[• •]: You have 7 000 0 $") / / When no least 50,000 if (mdum1a == 1) return SendClientMessage (playerid, COLOR_ZELENA, "[• •]: Sorry, this house was his own man!") / / - When someone has their own shows this mdum1a = 1 / / can holder for 1 so it could not buy one mdum1b [playerid] = 1 / / Can it to 1 can odemikat GivePlayerMoney (playerid, -70000) / / will give him money -70,000 SendClientMessage (playerid, COLOR_ZELENA, "[• •]: odnynн This house is yours!") / / Shows that the odeted ) ) ) if (Current == house1menu) ( switch (row) ( case 1: ( TogglePlayerControllable (playerid, true) / / defrost if (mdum1b [playerid] == 0) return SendClientMessage (playerid, COLOR_ZELENA, "[• •]: Are you the owner of this house!") / / indicates that the owner is not mdum1a = 0 / / give the owner at zero so they can one buy a house mdum1b [playerid] = 0; / / It had nothing to do nemoch of the house GivePlayerMoney (playerid, 70000); / / Return the money SendClientMessage (playerid, COLOR_ZELENA, "[• •]: House sold, they were recovered only half the price (7 000 0 $)!") / / Vipнše it is sold ) ) ) if (Current == house1menu) ( switch (row) ( case 2: ( TogglePlayerControllable (playerid, true) / / defrost dum1z = 0 / / Locks if (mdum1b [playerid] == 0) return SendClientMessage (playerid, COLOR_ZELENA, "[• •]: Are you the owner of this house!"); SendClientMessage (playerid, COLOR_ZELENA, "[• •]: The house was locked!") / / Shows the locked ) ) ) if (Current == house1menu) ( switch (row) ( case 3: ( TogglePlayerControllable (playerid, true) / / defrost dum1z = 1 / / It can house a state odemknutйho. if (mdum1b [playerid] == 0) return SendClientMessage (playerid, COLOR_ZELENA, "[• •]: Are you the owner of this house!") / / - shows that it is not the owner. SendClientMessage (playerid, COLOR_ZELENA, "[• •]: The house was unlocked!") / / - Vipнše the house unlocked. ) ) ) if (Current == house1menu) ( switch (row) ( case 4: ( TogglePlayerControllable (playerid, true) / / - defrost SendClientMessage (playerid, COLOR_ZELENA, "Info on the house:"); SendClientMessage (playerid, COLOR_ZELENA, "Number: '1'."); if (dum1z == 0) ( SendClientMessage (playerid, COLOR_WHITE, 'Lock: locked. "); ) else ( SendClientMessage (playerid, COLOR_WHITE, 'Lock: unlock. "); ) if (mdum1a == 0) ( SendClientMessage (playerid, COLOR_WHITE, "K: yes"); ) else ( SendClientMessage (playerid, COLOR_WHITE, "for sale: No"); ) SendClientMessage (playerid, COLOR_WHITE "Price: 10 000 0 $."); ) ) ) if (Current == house1menu) ( switch (row) ( case 5: ( TogglePlayerControllable (playerid, true) / / - defrost if (dum1z == 0) return SendClientMessage (playerid, COLOR_ZELENA, "[• •]: This house is boužel locked!") / / - ascertain if zamknutej And if it sends a message. SetPlayerPos (playerid, 234.8819,1189.8713,1080.2578) / / - portno him into the house. SetPlayerInterior (playerid, 3) / / - Can interior. SendClientMessage (playerid, COLOR_ZELENA, "[• •]: Vэtej in the house!") / / - Odessa it is in the house ) ) ) if (Current == house1menu) ( switch (row) ( case 6: ( TogglePlayerControllable (playerid, true) / / - defrost. ) ) ) [/ Code] This is about all .... Cars I did not :(