Jump to content

sckatchof

Members
  • Posts

    394
  • Joined

  • Last visited

Everything posted by sckatchof

  1. thank guys for help , but i try many times and still don't work .
  2. thnx , how can i fix it
  3. i work for turf system but i have some problem when i enter to turf zone output don't work ! part of server side : ... .. .. function OnresourceOpen (player) local ColSize = 10.0 for ID in pairs(Turfids) do local fX, fY, fZ = Turfids[ID][1], Turfids[ID][2], Turfids[ID][3] local CreateColid = createColCuboid ( fX, fY, fZ, ColSize, ColSize, ColSize ) if CreateColid then addEventHandler("onColShapeHit", CreateColid, OnPlayerOnColHit) end end end addEventHandler("onResourceStart", resourceRoot, OnresourceOpen) function OnPlayerOnColHit (player) local money = math.random(2580, 4950) if( source == CreateColid ) then if getElementData( player, "YouAreTurfing") then outputChatBox("You already Turfing.",player,255,0,0) return end outputChatBox("balblabla", player, 0,255,255) setElementData(player,"YouAreTurfing",true) triggerClientEvent (player,"tn:Turfing",getRootElement()) setRadarAreaFlashing ( pArea, true ) TurfTimers[ player ] = setTimer( function() ..... .. .. end, 300000, 1 ) end end
  4. thnx for help but sell don't work .
  5. hello guys , why this script don't work ? local xmlFile = nil local xmlNode = nil local yearday, hour function openFile( ) local time = getRealTime( ) yearday = time.yearday hour = time.hour local fileName = ( "TNSlogs/%04d-%02d-%02d/%02d.html" ):format( time.year + 1900, time.month + 1, time.monthday, time.hour ) xmlFile = xmlLoadFile( fileName ) if not xmlFile then xmlFile = xmlCreateFile( fileName, "html" ) local head = xmlCreateChild( xmlFile, "head" ) local title = xmlCreateChild( head, "title" ) xmlNodeSetValue( title, ( "TNS MTA :: Client Logs :: %04d-%02d-%02d" ):format( time.year + 1900, time.month + 1, time.monthday ) ) local style = xmlCreateChild( head, "style" ) xmlNodeSetAttribute( style, "type", "text/css" ) xmlNodeSetValue( style, "body { font-family: Tahoma; font-size: 0.8em; background: #000000; } p { padding: 0; margin: 0; } .v1 { color: #AAAAAA; } .v2 { color: #DDDDDD; } .v3 { white-space:pre; }" ) xmlNode = xmlCreateChild( xmlFile, "body" ) xmlSaveFile( xmlFile ) else xmlNode = xmlFindChild( xmlFile, "body", 0 ) end end addEventHandler( "onClientResourceStart", getResourceRootElement( ), function( ) openFile( ) end )
  6. but my problem is not with one panel many panels !!
  7. sckatchof

    Problem .

    hello my friends i have a problem in some panels i have make police computer and medic ... New admin panel they work just when their is in-pair player in my server like 1 player or 3 or 5 it work but when there is pair player my panels don't work i don't understand the problem where ?!
  8. thank you snake
  9. thnx for help and this when any player die dxD show to all players : addEventHandler( 'onClientPlayerWasted', root, function( ) dxshow = true if isTimer( DxTime ) then killTimer( DxTime ) end DxTime = setTimer( function( ) dxshow = false end, 1000, 1 ) end )
  10. sckatchof

    Need help

    hi guys i have problem when any Player joi server my intro script show for all players ! this is part of script : server : function OnPlayerjoinserver() showPlayerHudComponent ( source, "clock", false ) showPlayerHudComponent ( source, "radar", false ) showChat ( source, false ) triggerClientEvent("StartIntro", source) end addEventHandler ( "onPlayerJoin", getRootElement(), OnPlayerjoinserver)
  11. thank you kenix gg
  12. show your code to help you we can't help you without code .
  13. Omg thnx kenix i forget something it's not "housenumer" it's" "LabelHouseNumber" and now when i buy the house it work but pickup don't change and owner on gui don't change .
  14. don't work i have bad argument line 6 7 8 in server side and when i click buy house it outputChatBox ("This house is already Bought!",source, ...
  15. client : elseif (source == ButtonBuyHouse) then local housenumber = guiGetText (tonumber(housenumber)) triggerServerEvent ("HouseSystemBuyHouse",localPlayer,housenumber) server side : 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 ("Congratulations, you are the new owner!",source,255,0,0,false) outputChatBox ("Price: ".. tostring(price) .. "$!",source,255,0,0,false) for i,v in ipairs ( getElementsByType("pickup")) do local number = getElementData ( v, "housenumber" ) if ( number == housenumber ) then setPickupType ( v, 3, 1272 ) 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 ("Sorry, you are too poor!",source,255,0,0,false) end end xmlUnloadFile (root) end )
  16. i add tonumber(housenumber) and still don't work and nothing it show in debugscript 3
  17. you mean that if (source == ButtonBuyHouse) then local housenumber = guiGetText (LabelHouseNumber) triggerServerEvent ("HouseSystemBuyHouse",localPlayer,housenumber) end
  18. hello my friends i have post this problem again cause nobody can help me , my problem when i buy a house it output outputChatBox ("You have buy this house ...) and Nothing it change in xml file and owner stay blank and pick up don't change to 1273 . Server side : 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)
  19. need help guys
  20. Ok and thank for help
  21. nothing is output
  22. Error in this line elseif ( fOwner ~= '' and getPlayerMoney ( source ) >= tonumber ( fPrice ) ) then and wornig in this lines local fPrice = xmlNodeGetValue ( fHouse, 'cost' ); local fOwner = xmlNodeGetValue ( fHouse, 'owner' );
  23. DraKen i realy don't understand i want when i click buy house it save my account name in xml file and pick up change that what i want and thnx for help again
  24. how can i check !
×
×
  • Create New...