Jump to content

sckatchof

Members
  • Posts

    394
  • Joined

  • Last visited

Everything posted by sckatchof

  1. line 1and 2 and lien 14 local fPrice = xmlNodeGetValue ( fHouse, 'cost' ); local fOwner = xmlNodeGetValue ( fHouse, 'owner' ); if ( not isGuestAccount ( getPlayerAccount ( source ) ) ) then if ( fOwner == '' and getPlayerMoney ( source ) >= tonumber ( fPrice ) ) then takePlayerMoney ( source, tonumber ( fPrice ) ); xmlNodeSetValue ( xmlFindChild ( fHouse, 'owner', 0 ), getAccountName ( getPlayerAccount ( source ) ) ); outputChatBox ( 'You have bought this house for: $' .. price, source, 255, 255, 255, false ); for _, cPickup in ipairs ( getElementsByType 'pickup' ) do if ( getElementData ( cPickup, 'housenumber' ) == nHouse ) then -- check element data 'housenumber' setPickupType ( v, 3, 1273 ); end end xmlSaveFile ( fRoot ) elseif ( fOwner ~= '' and getPlayerMoney ( source ) >= tonumber ( fPrice ) ) then
  2. thanks for help but don't work . it show in debugscript 3 like this pic :
  3. thank for help but it show ( Node not found!' ) and this is my xml file "0" interior="0" x="2495.375" y="-1691.1376953125" z="14.765625" cost="500000" owner="sckatchof" dim="1" /> ... ...
  4. sorry but i don't understand writ me a example if you want .
  5. nothing it show in debugscript and it work but when i click buy house it show that msg outputChatBox ("You have buy this hou... and and take my money but owner don't save and pickup don't change
  6. sckatchof

    Need help

    hi guys i have a problem when i buy a house nothing ir save in my xml file and pick up don't change this is my event addEvent("HouseSystemBuyHouse",true) addEventHandler ("HouseSystemBuyHouse", getRootElement(), function(housenumber) local root = xmlLoadFile ("homes.xml") local houseHeadRootNode = xmlFindChild (root,"houses",0) local houseRootNode = xmlFindChild (houseHeadRootNode,"house",tonumber(housenumber)) local price = xmlNodeGetAttribute (houseRootNode,"cost") local owner = xmlNodeGetAttribute (houseRootNode,"owner") if not (isGuestAccount (getPlayerAccount(source))) then if (owner == "") and (getPlayerMoney (source) >= tonumber(price)) then takePlayerMoney (source,tonumber(price)) xmlNodeSetAttribute (houseRootNode,"owner",getAccountName(getPlayerAccount(source))) outputChatBox ("You have buy this house for : ".. tostring(price) .. "$",source,255,255,255,false) for i,v in ipairs ( getElementsByType("pickup")) do local number = getElementData ( v, "housenumber" ) if ( number == housenumber ) then setPickupType ( v, 3, 1273 ) end end xmlSaveFile (root) elseif not (owner == "") then outputChatBox ("This house is already Bought!",source,255,0,0,false) elseif (getPlayerMoney (source) < tonumber(price)) then outputChatBox ("You don't have enough money.",source,255,0,0,false) end end triggerClientEvent (source,"hideHouseGuiWindow",source) xmlUnloadFile (root) end)
  7. Edit : still don't work .
  8. this is my bind function onresourceStart () bindKey ("o", "down", showTnsAdminpanel) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart)
  9. my admin panel for my server when i click O it open but when any player join server when i click O don't work
  10. I don't have any problem in my script it work but when any player join my server the script don't work that's my problem.
  11. i have work for admin Panel only team staff can open it with click O but when i only in my server when i press O it work but when any player join my server and i try to open it dose not show idk why ?!
  12. sckatchof

    [Question]

    hi guys i problem i have work for admin panel and i tested it it work but when any player joins my server when i try to open it dose not show idk why ?
  13. sckatchof

    help

    Yes it's Event.
  14. sckatchof

    help

    ty jaysds1 for help it's work
  15. sckatchof

    help

    hi guys i have problem output dose not show why ? this is server side part : function( skin, playername ) local player = getPlayerFromName(playername) if ( player ) then setElementModel(player, skin) outputChatBox ( "'"..getPlayerName( source ).."' changed your skin to '"..skin.."'!", player, 255, 100, 70 ) else outputChatBox ( "Invalid Nick", source, 255, 0, 0 ) end end
  16. grid list empty but when i buy a car it show in grid list car name
  17. ok, Can you post the code you currently have please. Client Side : .. .. .. addEventHandler("onClientGUIClick",GridlOwnerCar,function(button) if(button=="left")then local rowindex, columnindex = guiGridListGetSelectedItem ( GridlOwnerCar ) local carname = guiGridListGetItemText ( GridlOwnerCar, rowindex, columnindex) triggerServerEvent("PCar", localPlayer, carname) end end,false) .. Server Side : addEvent("PCar",true) addEventHandler("PCar",root,function(carname) if(carname ~= "")then for i,cars in ipairs(getElementsByType("vehicle")) do if(getVehicleName(cars)==carname)then createBlipAttachedTo(cars,42,3,0,0,0,0,0,65535,client) end end end end)
  18. what is not work? does the vehicle exist? yes it exist when i buy a car it show in gridlist i want when i go to ather player and open gui and select my car from grid and click on Blip button it show on the radar that what i want .
×
×
  • Create New...