Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. create the image using the dxDrawImage and make sure you draw the image before the text!
  2. Jaysds1

    gui help

    You said you want the data to be updated in the GUI right? try this: local getoccup = getElementData( getLocalPlayer(), "Occupation" ) local getmoney = getPlayerMoney(getLocalPlayer()) local getserial = getPlayerSerial(getLocalPlayer()) local totalkills = getElementData( getLocalPlayer(),"TK" ) or 0 local totaldeaths = getElementData( getLocalPlayer(),"TD" ) or 0 local totalkillsdeaths = getElementData( getLocalPlayer(),"KDR" ) or 0 function menuShow () visableornot = guiGetVisible (theWindow2) if (visableornot == true) then guiSetVisible (theWindow2, false) showCursor (false) guiSetText(label,"",true) guiSetText(label1,"",true) guiSetText(label2,"",true) guiSetText(label3,"",true) guiSetText(label4,"",true) guiSetText(label5,"",true) guiSetText(label6,"",true) elseif (visableornot == false) then getoccup = getElementData( getLocalPlayer(), "Occupation" ) getmoney = getPlayerMoney(getLocalPlayer()) getserial = getPlayerSerial(getLocalPlayer()) totalkills = getElementData( getLocalPlayer(),"TK" ) or 0 totaldeaths = getElementData( getLocalPlayer(),"TD" ) or 0 totalkillsdeaths = getElementData( getLocalPlayer(),"KDR" ) or 0 guiSetVisible (theWindow2, true) showCursor (true) guiSetText(label,"Your Correct Occupation: "..getoccup) guiSetText(label1,"Your name: "..getPlayerName(getLocalPlayer())) guiSetText(label2,"Your name: $"..tostring(getmoney)) guiSetText(label3,"Your Serial is: "..tostring(getserial)) guiSetText(label4,"Your Total Kills: "..tostring(totalkills)) guiSetText(label5,"Your Total Deaths: "..tostring(totaldeaths)) guiSetText(label6,"Your Total KDR: "..tostring(totalkillsdeaths)) end end --and last this for id, player in ipairs(getElementsByType("player")) do guiComboBoxAddItem(guicomboBox, getPlayerName(player)) end This will be updated when the gui is opened!
  3. Jaysds1

    gui help

    try this: local getoccup = getElementData( getLocalPlayer(), "Occupation" ) local getmoney = getPlayerMoney(getLocalPlayer()) local getserial = getPlayerSerial(getLocalPlayer()) local totalkills = getElementData( getLocalPlayer(),"TK" ) or 0 local totaldeaths = getElementData( getLocalPlayer(),"TD" ) or 0 local totalkillsdeaths = getElementData( getLocalPlayer(),"KDR" ) or 0 setTimer(function() getoccup = getElementData( getLocalPlayer(), "Occupation" ) getmoney = getPlayerMoney(getLocalPlayer()) getserial = getPlayerSerial(getLocalPlayer()) totalkills = getElementData( getLocalPlayer(),"TK" ) or 0 totaldeaths = getElementData( getLocalPlayer(),"TD" ) or 0 totalkillsdeaths = getElementData( getLocalPlayer(),"KDR" ) or 0 end,10000,0) function menuShow () visableornot = guiGetVisible (theWindow2) if (visableornot == true) then guiSetVisible (theWindow2, false) showCursor (false) guiSetText(label,"",true) guiSetText(label1,"",true) guiSetText(label2,"",true) guiSetText(label3,"",true) guiSetText(label4,"",true) guiSetText(label5,"",true) guiSetText(label6,"",true) elseif (visableornot == false) then guiSetVisible (theWindow2, true) showCursor (true) guiSetText(label,"Your Correct Occupation: "..getoccup) guiSetText(label1,"Your name: "..getPlayerName(getLocalPlayer())) guiSetText(label2,"Your name: $"..tostring(getmoney)) guiSetText(label3,"Your Serial is: "..tostring(getserial)) guiSetText(label4,"Your Total Kills: "..tostring(totalkills)) guiSetText(label5,"Your Total Deaths: "..tostring(totaldeaths)) guiSetText(label6,"Your Total KDR: "..tostring(totalkillsdeaths)) end end --and last this for id, player in ipairs(getElementsByType("player")) do guiComboBoxAddItem(guicomboBox, getPlayerName(player)) end @Pain - That would only update the gui which is not needed, you would need to update the variables for the element data at the top!
  4. Jaysds1

    gui help

    How do you want this to update? He wants the variables at the top to be updated after such and such time so, players could see there's new scores.
  5. Well, think about it, MTA isn't going to stay with SA the whole time... most of the work is being put into SA because everyone loves it and it shows how far MTA can change a game. Future MTA Mods are going to be with IV and V, and there will be different domain names for all of them, so that's why they can't redirect MTA to MTASA.com
  6. Jaysds1

    help

    ok, this should be the end now, copy and try my code again, I've forgotten about the table part but now I've fixed it...
  7. Jaysds1

    help

    I've added it in the script.. here: addCommandHandler("createped",function(player, cmd, modelid, x1, y1, z1,...) if not(modelid or x1 or y1 or z1 or msg) then outputChatBox("[invalid Syntax]: /createped [modelid] [x] [y] [z] [text]", player, 255, 0, 0 ) return end local modelid = tonumber(modelid) local x1 = tonumber(x1) local y1 = tonumber(y1) local z1 = tonumber(z1) ped1 = createPed ( modelid, x1, y1, z1) setPedFrozen ( ped1, true) setElementData(ped1,"msg",table.concat(...,"")) --this stores the msg with the ped cool = createColRectangle ( x1, y1, 5, 5 ) setElementData(cool,"pedcol",true) setElementData(cool,"sourceped",ped1) end) addEventHandler ("onColShapeHit", root,function(hitPlayer) if getElementType(hitPlayer)~="player" or not getElementData(source,"pedcol") then return end local ped = getElementData(source,"sourceped") local text = getElementData(ped,"msg") outputChatBox ( "Bot say:"..text, hitPlayer, 255, 0, 0 ) end) EDITED!
  8. Jaysds1

    help

    Thanks TAPL, I knew I was missing something from the code...
  9. Jaysds1

    help

    try my code on my last post: viewtopic.php?f=91&t=55535#p536455
  10. Jaysds1

    help

    So, you want a msg for the ped it self right, and the msg doesn't change when ever you want to create another one? try this: addCommandHandler("createped",function(player, cmd, modelid, x1, y1, z1,msg) if not(modelid or x1 or y1 or z1 or msg) then outputChatBox("[invalid Syntax]: /createped [modelid] [x] [y] [z] [text]", player, 255, 0, 0 ) return end local modelid = tonumber(modelid) local x1 = tonumber(x1) local y1 = tonumber(y1) local z1 = tonumber(z1) ped1 = createPed ( modelid, x1, y1, z1) setPedFrozen ( ped1, true) setElementData(ped1,"msg",table.concat(text,"")) --this stores the msg with the ped cool = createColRectangle ( x1, y1, 5, 5 ) setElementData(cool,"pedcol",true) setElementData(cool,"sourceped",ped1) end) addEventHandler ("onColShapeHit", root,function(hitPlayer) if getElementType(hitPlayer)~="player" or not getElementData(source,"pedcol") then return end local ped = getElementData(source,"sourceped") local text = getElementData(ped,"msg") outputChatBox ( "Bot say:"..text, hitPlayer, 255, 0, 0 ) end)
  11. or maybe he doesn't see when the ped crouches because after he stands up... Try my code again, I've made it on when you spawn, the ped crouches. Try spawning as close to the ped! if that doesn't work then try this: addEventHandler("onClientPlayerSpawn",resourceRoot,function() ped = createPed (147, -2460.5966796875, 777.271484375, 35.171875,90) setTimer (setPedControlState,10000,0,ped,"crouch", true) --every 10 secs the ped would crouch end) This code will make the ped continually crouch after 10 secs. EDITED: Noob mistake Thnx TAPL for correcting me!!!
  12. try this instead: addEventHandler("onClientGUIClick", GUIEditor.button[3],function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end,false)
  13. Jaysds1

    need help

    Are you running your site on a vps?
  14. np, and I've edited the code again just in-case you want it
  15. next time please use [xml]<div class="lua" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1"><div class=<span style="color: #ff0000;">"lua"</span> id=<span style="color: #ff0000;">"{CB}"</span> style=<span style="color: #ff0000;">"font-family: monospace;"</span>><ol><li style=<span style="color: #ff0000;">""</span> class=<span style="color: #ff0000;">"li1"</span>> </li></ol></div></li></ol></div>[/xml] tags please. try this: object1 = createObject(986, 2497.3999023438, 2777.3000488281, 11.5, 0, 0, 270.24169921875) -- right gate object2 = createObject(985, 2497.3000488281, 2769.3000488281, 11.5, 0, 0, 270.24169921875) -- left gate function gateo(player) -- moving the gates function moveObject(object1, 3000, 2497.099609375, 2785.099609375, 11.5, 0, 0, 0) -- opening the gates moveObject(object2, 3000, 2497.3999023438, 2761, 11.5, 0, 0, 0) -- opening the gates setTimer(gatec,5000,1) --set timer to close gates after 5 secs end function gatec(player) -- closing the gates function moveObject(object1, 3000, 2497.3999023438, 2777.3000488281, 11.5, 0, 0, 0 ) -- closing the gates moveObject(object2, 3000, 2497.3000488281, 2769.3000488281, 11.5, 0, 0, 0) -- closing the gates end addCommandHandler("nopedotavi", gateo)
  16. Try downloading and running this MTADiag, then post the generated PasteBin URL here please.
  17. Jaysds1

    Error installing MTA

    Can you download and run this MTADiag, then post the generated PasteBin url here please.
  18. This is caused because you have a program that modifies GTA/MTA. If you do, then try ending it.
  19. you would need to use these:onClientGUIClick guiSetVisible showCursor
  20. Jaysds1

    House system

    lol, I meant you need permission to edit the resource, we only help people who are willing to learn and make resources for them selves...
  21. In the latest Map Editor, you are able to delete objects. Try downloading it now: http://code.google.com/p/mtasa-resource ... p&can=2&q= Watch this to see how to remove objects while in map editor:
×
×
  • Create New...