Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    fix it pls

    Make it yourself? why steal scripts? start learning here https://wiki.multitheftauto.com/wiki/Main_Page He didn't stole it this time... I made it for him in another topic
  2. Castillo

    sound

    You can't do this, maybe you could play a sound in the background with playSound, but I don't know how good would it be.
  3. local x, y = guiGetPosition(myProgressBar, false) guiProgressBarSetProgress(myProgressBar, 1) addEventHandler("onClientGUIClick", myProgressBar, function (button, state, posX, posY) local cX = guiGetScreenSize() * getCursorPosition1() local pX, pY = guiGetPosition(myProgressBar, false) local x = cX / pX local x = x - 8 local x = x * 28 local progress = x if progress <= 1 then progress = 1 elseif progress >= 100 then progress = 100 end guiProgressBarSetProgress(myProgressBar, math.floor(progress)) end, false) P.S: Rename getCursorPosition1() to getCursorPosition().
  4. This resource has auto login system: https://community.multitheftauto.com/ind ... ls&id=1557
  5. Castillo

    Problems

    That's easily changeable, you just have to think for a while, and not come here and ask without even try.
  6. Castillo

    Problems

    I think this could help you: https://community.multitheftauto.com/index.php?p= ... ls&id=1029
  7. Stolen script from Mini-Missions server: https://community.multitheftauto.com/index.php?p= ... ls&id=2440
  8. Fixed it! local windowsData = {} windowsData["pedWindow"] = {} windowsData["pedName"] = {} windowsData["pedAge"] = {} windowsData["pedFaction"] = {} windowsData["pedFactionRank"] = {} windowsData["pedLastLogin"] = {} windowsData["pedArea"] = {} windowsData["pedPlayB"] = {} function selectPedWindow(element, abX, abY, charName, charSkin, charCKed, charArea, charAge, charFaction, charRank, charLogin) local x = abX - 75 local y = abY/4.5 windowsData["pedWindow"][charName] = guiCreateWindow(x, y,159,228,"",false) guiSetAlpha(windowsData["pedWindow"][charName],.70) guiWindowSetMovable(windowsData["pedWindow"][charName],false) guiWindowSetSizable(windowsData["pedWindow"][charName],false) guiSetVisible (windowsData["pedWindow"][charName], false) --skinPicture = guiCreateStaticImage(0.2956,0.114,0.4025,0.1711,"",true,pedWin) windowsData["pedName"][charName] = guiCreateLabel(0.1258,0.3158,0.6792,0.0614,"Name: "..tostring(charName).."",true,windowsData["pedWindow"][charName]) windowsData["pedAge"][charName] = guiCreateLabel(0.1258,0.3904,0.6792,0.0702,"Age: "..tostring(charAge).."",true,windowsData["pedWindow"][charName]) windowsData["pedFaction"][charName] = guiCreateLabel(0.1258,0.4561,0.6792,0.0614,"Faction:",true,windowsData["pedWindow"][charName]) windowsData["pedFactionRank"][charName] = guiCreateLabel(0.1258,0.5219,0.6792,0.0614,"Faction Rank:",true,windowsData["pedWindow"][charName]) windowsData["pedLastLogin"][charName] = guiCreateLabel(0.1258,0.6623,0.6792,0.0658,"Last Login:",true,windowsData["pedWindow"][charName]) windowsData["pedArea"][charName] = guiCreateLabel(0.1258,0.5921,0.6792,0.0614,"Last Area: ",true,windowsData["pedWindow"][charName]) windowsData["pedPlayB"][charName] = guiCreateButton(0.2075,0.8158,0.5975,0.1404,"Play!",true,windowsData["pedWindow"][charName]) if guiGetVisible ( windowsData["pedWindow"][charName] ) then destroyElement(windowsData["pedWindow"][charName]) outputDebugString("window destroyed") else guiSetVisible(windowsData["pedWindow"][charName], true) outputDebugString("window creating") end end addEvent("selectPedWin", true) addEventHandler("selectPedWin", getRootElement(), selectPedWindow) I'd this to test: addEventHandler("onClientClick",root,function (button,state,absoluteX,absoluteY,posX,posY,posZ,entity) if entity and getElementType(entity) == "ped" then selectPedWindow(entity,absoluteX,absoluteY,tostring(getElementData(entity,"name")),46,nil,nil,tostring(getElementData(entity,"age")),nil,nil,nil) end end)
  9. Well, they don't offer a FREE service, and also, if you choose well the company, I don't think they would steal your scripts.
  10. ......? I wouldn't trust someone who just says "Who want's free hosting?", because he could steal all the scripts I would put in the server.
  11. You can search for gamemodes/scripts/maps in here: https://community.multitheftauto.com/
  12. Now i'm confused, you we're laughting that I didn't used a trigger (because I didn't know much about them), and now you're saying something totally different...
  13. "Triggering would be anti-stealing scripts as you did with setVehicleHeadLightColor in your userpanel ." When I made that userpanel I didn't know much about scripting, didn't know much about triggers, etc.
  14. local windowsData = {} windowsData["pedName"] = {} windowsData["pedAge"] = {} windowsData["pedFaction"] = {} windowsData["pedFactionRank"] = {} windowsData["pedLastLogin"] = {} windowsData["pedArea"] = {} windowsData["pedPlayB"] = {} function selectPedWindow(element, abX, abY, charName, charSkin, charCKed, charArea, charAge, charFaction, charRank, charLogin) local x = abX - 75 local y = abY/4.5 local pedWin = guiCreateWindow(x, y,159,228,"",false) guiSetAlpha(pedWin,.70) guiWindowSetMovable(pedWin,false) guiWindowSetSizable(pedWin,false) guiSetVisible (pedWin, false) --skinPicture = guiCreateStaticImage(0.2956,0.114,0.4025,0.1711,"",true,pedWin) windowsData["pedName"][charName] = guiCreateLabel(0.1258,0.3158,0.6792,0.0614,"Name: "..tostring(charName).."",true,pedWin) windowsData["pedAge"][charName] = guiCreateLabel(0.1258,0.3904,0.6792,0.0702,"Age: "..tostring(charAge).."",true,pedWin) windowsData["pedFaction"][charName] = guiCreateLabel(0.1258,0.4561,0.6792,0.0614,"Faction:",true,pedWin) windowsData["pedFactionRank"][charName] = guiCreateLabel(0.1258,0.5219,0.6792,0.0614,"Faction Rank:",true,pedWin) windowsData["pedLastLogin"][charName] = guiCreateLabel(0.1258,0.6623,0.6792,0.0658,"Last Login:",true,pedWin) windowsData["pedArea"][charName] = guiCreateLabel(0.1258,0.5921,0.6792,0.0614,"Last Area:",true,pedWin) windowsData["pedPlayB"][charName] = guiCreateButton(0.2075,0.8158,0.5975,0.1404,"Play!",true,pedWin) if guiGetVisible ( pedWin ) then destroyElement(pedWin) outputDebugString("window destroyed") else guiSetVisible(pedWin, true) outputDebugString("window creating") end end addEvent("selectPedWin", true) addEventHandler("selectPedWin", getRootElement(), selectPedWindow) Try that (not tested).
  15. Castillo

    Problems

    Copy the server side part again, you could have did what I changed to do what you want.
  16. https://wiki.multitheftauto.com/wiki/Resources That'll tell you how to install resources in your server.
  17. Castillo

    Problems

    --client side: players_on = guiCreateLabel(243,372,16,22,"0",false,rules) addEvent("players",true) addEventHandler("players",root, function(count) guiSetText(player_on, tostring(count)) end) --server side: addEventHandler("onPlayerJoin",root, function () local count = getPlayerCount() triggerClientEvent("players",getRootElement(),count) end)
  18. You only have one window here..... you are overwritting the data every time you click a ped?
  19. There's an example, I just tested it and it outputs the correct data: ------------------------------------ Seat 0: [sANL]Castillo Seat 1: <empty> ------------------------------------
  20. Castillo

    MTA Question

    I'm not sure.
  21. So, the problem is when you create the GUI's? if so, could you post the GUI creation part?
  22. Have you tried adding debug outputs? like add a output for the character name and so on (in client side).
  23. Castillo

    MTA Question

    You can't edit the San Andreas MAP, but maybe you could import a invisible object without collision for that statue.
×
×
  • Create New...