Jump to content

daKillar2000

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by daKillar2000

  1. heey i want save me house here i want save when buy house local subnode = xmlCreateChild ( file, "house" ) function onHouseBuy ( cost, ID ) cost = tonumber ( cost ) if ( getPlayerMoney ( source ) >= cost ) then local total = totalHouse ( source ) if ( total < 2 ) then local subnode = findHouse ( ID ) if ( subnode ) then local theAccount = getPlayerAccount ( source ) if not ( isGuestAccount ( theAccount ) ) then xmlNodeSetAttribute ( subnode, "owner", getAccountName ( theAccount ) ) triggerClientEvent ( source, "closeGUI", source, "E" ) takePlayerMoney ( source, cost ) [size=6] xmlSaveFile ( file )[/size] t[createPickup ( x, y, z, 3, 1273, 5000 )] = ID - 1 end if ( isGuestAccount ( theAccount ) ) then outputChatBox ( "You must be logged in.", source ) end cost = nil end end if not ( total > 2 ) and ( cost ) then outputChatBox ( "You can't own more than two properties.", source ) end end if ( cost ) and ( getPlayerMoney ( source ) < cost ) then outputChatBox ( "You can't afford it.", source ) end end addEvent ( "onHouseBuy", true ) addEventHandler ( "onHouseBuy", getRootElement ( ), onHouseBuy ) Whats wrong??
  2. ok i put that but not works again i do this: ----Serverside function bankstatus (source) local account = getPlayerAccount (source); local balance = exports.bank:getBankAccountBalance( source ) triggerClientEvent (source,"banklabel",source,balance) end -----ClientSide addEvent("banklabel", true ) function banklabel( balance ) guiSetText(DaPlayerBank,"Bank: $ " ..tostring(balance)) end I Dont Know Why Not Works
  3. -client side addEvent("banklabel", true ) function banklabel( ) bank = tonumber(balance) guiSetText(DaPlayerBank,"Bank: $ " ..tostring(thePlayer,balance)) end serverside function bankstatus (source) local account = getPlayerAccount (source); if not isGuestAccount(account) then local balance = getBankAccountBalance(source) triggerClientEvent (source,"banklabel",source,balance) end end
  4. pardon solid delete his comment O_o pfff
  5. heey i have a little problem when i go in me house then he enter the house whit no interior -------- markerhit function onMarkerHit ( hitPlayer) if ( cancel[hitPlayer] ) then if ( getTickCount () - cancel[hitPlayer] < 1000 ) then return end end local block = true if ( e[source] ) or ( o[source] ) then if ( getElementData ( hitPlayer, "block" ) ) then block = nil end end if not ( getElementData ( hitPlayer, "block" ) ) then if (getElementType (hitPlayer) == "player") and not (isPedInVehicle (hitPlayer)) then if not ( getElementData ( source, "lock" ) ) then if ( o[source] ) then local getElementData = findHouse ( o[source] ) local root = xmlLoadFile ("houses.xml") local int = setElementInterior(hitPlayer,ID) getElementData = xmlFindChild ( hitPlayer, "entrance", 0 ) local attribute = xmlNodeGetAttribute ( hitPlayer, "ID" ) getElementData = findInterior ( attribute ) local interior = xmlNodeGetAttribute (hitPlayer, "ID" ) local x = xmlNodeGetAttribute ( hitPlayer, "PosX" ) local y = xmlNodeGetAttribute ( hitPlayer, "PosY" ) local z = xmlNodeGetAttribute ( hitPlayer, "PosZ" ) setElementInterior ( hitPlayer,ID, x, y, z ) setElementData ( hitPlayer, "block", true ) setElementData ( hitPlayer, "return", o[source] ) end if ( e[source] ) then local ID = getElementData ( hitPlayer, "return" ) local getElementData = findHouse ( ID ) getElementData = xmlFindChild ( hitPlayer, "entrance", 0 ) local x,y,z = getPos ( hitPlayer ) ID = xmlNodeGetAttribute ( getElementData, "ID" ) setElementInterior ( hitPlayer, id, x, y, z ) setElementData ( hitPlayer, "block", true ) end end end end if not ( block ) then setElementData ( hitPlayer, "block", nil ) cancel[hitPlayer] = getTickCount () end end addEventHandler ( "onMarkerHit", getRootElement(), onMarkerHit ) -----houses xml can anny help me
  6. pardon i know if it serverside O_o
  7. DaPlayerBank = guiCreateLabel(15, 138, 217, 15, "Bank:", false, PlayerinfoW) guiLabelSetHorizontalAlign(DaPlayerBank, "left", false) guiLabelSetVerticalAlign(DaPlayerBank, "center") guiSetText(DaPlayerBank,"Bank: $ " ..tostring(getElementData(lp,"bank.money")))
  8. says now bank: false if i depos... money
  9. hi i have a question how i can check howmuch a player have on his bank ..tostring(getElementData(lp,"money")) then he takes handmoney how i do for bank
  10. i have getElemtByType by player if i change it to vehicl1 vehicle2 etc... then not works:(
  11. omg this a movie if i show upgrade saves works but he add it on all vehicles O_o how to fix
  12. look he works fine but only he add it on all vehicles
  13. check this for car 1: for i,v1 in ipairs (getElementsByType ("player")) do this for car2: for i,v2 in ipairs (getElementsByType ("player")) do this for car3: for i,v3 in ipairs (getElementsByType ("player")) do this for car4: for i,v4 in ipairs (getElementsByType ("player")) do the problem is when i upgrade car1 then he do the upgrades too on car2 car3 and car4, how fix it ?
  14. ok thats fixed but when he saves one car he add the upgrades on all cars when spawn O_o and when he explode he don't get the upgrades
  15. i have only one problem when he is in car then he only saves if he exit the vehicle and explode car he gives warning this warning WARNING: Player_menu\guiS.lua:948: Bad argument @ 'getElementID' this the line: if (getElementID(getPedOccupiedVehicle(v)) == getAccountName (getPlayerAccount(v))) then
  16. WARNING: login\script.lua:21: Bad argument @ 'logIn' WARNING: login\script.lua:5: Bad argument @ 'logIn' line5: if (logIn(account,username,password) == true) then line21: if (logIn(account,username,password) == true) then
  17. it works or all players;) but meaby u know more addvents
×
×
  • Create New...