Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. Et-win

    Help Race

    Open resource 'race' and open 'meta.xml' and search for "randommaps". Set it from 'false' to 'true'.
  2. I believe this is out of the Admin Panel if I am right.
  3. Try this: function previewTheCar () local theVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) local driver = getVehicleController ( theVehicle ) c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12 = getVehicleColor ( theVehicle, true ) if ( getElementDimension (driver) == 0 ) then setElementDimension ( driver, 1 ) setElementDimension ( theVehicle, 1 ) fadeCamera(true) setCameraMatrix ( -1940.6650390625, 251.3447265625, 37.063766479492, -1936.1552734375, 246.1298828125, 34.4609375) closeButtonOnPreview = guiCreateButton(850, 1000, 350, 30, "Close", false) addEventHandler("onClientGUIClick", closeButtonOnPreview, cancelPreview) guiSetVisible (modWindow, false) addEventHandler("onClientGUIClick", colorList, setVehicleColorMod) end end function cancelPreview () guiSetVisible (modWindow, true) destroyElement (closeButtonOnPreview) if ( getElementDimension ( getLocalPlayer() ) == 1 ) then setElementDimension ( getLocalPlayer(), 0 ) setElementDimension ( getLocalPlayer(), 0 ) fadeCamera(false, 1) local theVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) setVehicleColor ( theVehicle, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12 ) end end
  4. getVehicleColor It returns 4 colors. So it has to be: vehColor1, vehColor2, vehColor3, vehColor4 = getVehicleColor ( theVehicle , false) If you want all the 4 colors of the vehicle, then set it to true and add it until 12.
  5. Be more specific next time then -.-
  6. It should work, but it doesn't. So why would we throw some outputChatBoxes into it? Right, to check where it stops in order to find any bugs or not working stuff. function fixall(tPlayer, tCommand) outputChatBox("Test1") if (eventName == "startFixAllPlayers") then tPlayer = source end accountname = getAccountName (getPlayerAccount(tPlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ("Admin") ) then if isPedInVehicle(tPlayer) then for i,player in ipairs(getElementsByType("player")) do fixVehicle(getPedOccupiedVehicle(player)) outputChatBox("Test4") end setTimer(outputChatBox,50,1,"Bla Bla Bla",getRootElement(),171,205,239,true) outputChatBox("Test5") else outputChatBox("Test3") end else outputChatBox("Bla Bla Bla",source, 255, 0, 0, true) outputChatBox("Test2") end end addEvent("startFixAllPlayers", true) addEventHandler("startFixAllPlayers", getRootElement(), fixall) function restoreAllBlood_CMD(thePlayer, theCMD) outputChatBox("Test7") if (eventName == "startBloodAllPlayers") then thePlayer = source end local accountName = getAccountName(getPlayerAccount(thePlayer)) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then local alivePlayers = getAlivePlayers(); if(alivePlayers ~= false) then for key, value in ipairs(alivePlayers) do setElementData(value, "blood", 12000); outputChatBox("Bla Bla Bla", value, 0, 255, 0); outputChatBox("Test12") end outputChatBox("Test11") else outputChatBox("Test10") end else outputChatBox("Bla Bla Bla", thePlayer, 255, 0, 0); outputChatBox("Test9") end else outputChatBox("Test8") end end addEvent("startBloodAllPlayers", true) addEventHandler("startBloodAllPlayers", getRootElement(), restoreAllBlood_CMD) Now run it. What does it output? Also check debugscript, because I already guess it's again the buttons.
  7. I said throw some random outputChatBoxes into the code to see where it stops or it does even start.
  8. I did. And if you look in that code before this one, you would know e.e
  9. Et-win

    Freeroam

    First copying it and then asking us for help, tsk...
  10. I retyped it because maybe an unseen typos or something like that. Now quit complaining "It's not work" and go put outputChatBoxes into it and let us atleast know or it does even start the damn function or where it stops. Now it's your turn to do something.
  11. First of all set this: local vehColor = getVehicleColor ( theVehicle ) --To: vehColor = getVehicleColor ( theVehicle ) If you put it local, the code on line 106 will not be able to read it. You will need to make another function which detects when you click on a the gridlist (onClientGUIClick), then set the vehicle's color.
  12. for placeNumber, textData in ipairs(tTable) do local selectedRow, selectedColumn = guiGridListGetSelectedItem(colorList) local colorData = guiGridListGetItemData(colorList, selectedRow, selectedColumn) setVehicleColor ( theVehicle, textData[2], textData[3], textData[4] ) Logical. He is going to set the vehicle's color for every color that is in the table. The last color in the table is 'Light Pink' so that color will be set.
  13. Where did you place the code in the script?
  14. function fAll(tPlayer, tCommand) if (eventName == "startFixAllPlayers") then tPlayer = source end local gPlayerName = getPlayerName(tPlayer) local gPlayerAccount = getPlayerAccount(tPlayer) if (gPlayerAccount ~= false) then local gAccountName = getAccountName(gPlayerAccount) if (gAccountName ~= false) then local gGroup1 = isObjectInACLGroup("user."..gAccountName, aclGetGroup("Admin")) local gGroup2 = isObjectInACLGroup("user."..gAccountName, aclGetGroup("SuperModerator")) if (gGroup1 == true) or (gGroup2 == true) then for placeNumber, playerData in ipairs(getElementsByType("player")) do if (isPedInVehicle(playerData) == true) then local gVehicle = getPedOccupiedVehicle(playerData) if (gVehicle ~= false) then fixVehicle(playerData) outputChatBox("Your vehicle have been fixed by: "..gPlayerName, playerData, 255, 255, 255, true) end end end else outputChatBox("You don't have permission to do this.", tPlayer, 255, 255, 255, true) end end end end addCommandHandler("fixall", fAll) addEvent("startFixAllPlayers", true) addEventHandler("startFixAllPlayers", getRootElement(), fAll) function bAll(tPlayer, tCommand) if (eventName == "startBloodAllPlayers") then tPlayer = source end local gPlayerName = getPlayerName(tPlayer) local gPlayerAccount = getPlayerAccount(tPlayer) if (gPlayerAccount ~= false) then local gAccountName = getAccountName(gPlayerAccount) if (gAccountName ~= false) then local gGroup1 = isObjectInACLGroup("user."..gAccountName, aclGetGroup("Admin")) local gGroup2 = isObjectInACLGroup("user."..gAccountName, aclGetGroup("SuperModerator")) if (gGroup1 == true) or (gGroup2 == true) for placeNumber, playerData in ipairs(getElementsByType("player")) do if (isPedAlive(playerData) == false) then setElementData(playerData, "blood", 12000) outputChatBox("You have been 'blooded' by: "..gPlayerName, playerData, 255, 255, 255, true) end end else outputChatBox("You don't have permission to do this.", tPlayer, 255, 255, 255, true) end end end end addCommandHandler("bloodall", bAll) addEvent("startBloodAllPlayers", true) addEventHandler("startBloodAllPlayers", getRootElement(), bAll)
  15. All be happy it can work. Who ever gave such a thing away? Anyway, maybe he will keep it updated and improve it?
  16. You first have to do xmlFindChild for settings. Then do xmlNodeGetChildren.
  17. {"Red", 255, 0, 0} setVehicleColor(theVehicle, textData[2], textData[3], textData[4])
  18. viewtopic.php?f=148&t=40244 Here is some more explanation.
  19. Example 2, I want a table in a table and get texts out of it: tTable = { --Let's make some tables in a table {"Row0", "This is my row0 string"} --Index 1 of 'tTable', this has a table. This table has "Row0" in the first index of this table, with a text in the second index {"Row1", "Hello world"} {"Row2", "Test123"} {"Row3", "Monkey's"} {"Row4", "Row4"} {"Row5", "Lollol"} } function fill() local gList = guiCreateGridList(50, 50, 500, 500, false) --Make a grid list local col1 = guiGridListAddColumn(gList, "Column 1", 0.45) --Make column 1 local col2 = guiGridListAddColumn(gList, "Column 2", 0.45) --Make column 2 for placeNumber --[[index number of the 'tTable' table in this case]], tableData --[[He gets the table which is on that index (In this case)]] in ipairs(tTable) do --I want the first index of the table (tableData) in column 1, and the second index in column 2 local row = guiGridListAddRow(gList) guiGridListSetItemText(gList, row, col1, tableData[1], false, false) guiGridListSetItemText(gList, row, col2, tableData[2], false, false) --'tableData[1]' means: Get index 1 of the table. --'tableData[2]' means: Get index 2 of the table. --Etc. end --'End' the loop end --'End' the function fill() EDIT: I know how everything works, but I can't explain it really good in English.
  20. Good, how to explain that... placeNumber = (in this case) the entry which is being checked now. textData = the 'data' (can be a table, code, text, etc.) which he gets in this entry from the table. (My explanation sucks )
  21. You can do it like this: tTable = { "Row0", --Table index 1 "Row1", --Table index 2 "Row2", --Table index 3 "Row3", --Table index 4 "Row4", --Table index 5 "Row5" --Table index 6 } function fill() --Make the function local gList = guiCreateGridList(50, 50, 500, 500, false) --Make a grid list local col = guiGridListAddColumn(gList, "Column Name", 1) --Make a column for placeNumber, textData in ipairs(tTable) do --Make a loop, for every index that is in the table, do the next code: local row = guiGridListRow(gList) --Add a row in the gridlist guiGridListSetItemText(gList, row, col, textData, false, false) --Set the text in the row end --'End' the loop end --'End' the function fill() (Quick example, not tested, but it is about how to do it anyway )
  22. What do you want? I didn't even understand your post in the first way...
  23. function fixall(tPlayer, tCommand) if (eventName == "startFixAllPlayers") then tPlayer = source end local accountname = getAccountName (getPlayerAccount(tPlayer)) if (isObjectInACLGroup("user."..accountname, aclGetGroup("Admin"))) or (isObjectInACLGroup("user."..accountname, aclGetGroup("SuperModerator"))) then if isPedInVehicle(tPlayer) then for i,player in ipairs(getElementsByType("player")) do fixVehicle(getPedOccupiedVehicle(player)) end setTimer(outputChatBox,50,1,"Bla Bla Bla",getRootElement(),171,205,239,true) end else outputChatBox("Bla Bla Bla",tPlayer, 255, 0, 0, true) end end addCommandHandler("fixall",fixall) addEvent("startFixAllPlayers", true) addEventHandler("startFixAllPlayers", getRootElement(), fixall) function restoreAllBlood_CMD(thePlayer, theCMD) if (eventName == "startBloodAllPlayers") then thePlayer = source end local accountName = getAccountName(getPlayerAccount(thePlayer)) if(accountName) then if (isObjectInACLGroup("user."..accountname, aclGetGroup("Admin"))) or (isObjectInACLGroup("user."..accountname, aclGetGroup("SuperModerator"))) then local alivePlayers = getAlivePlayers(); if(alivePlayers ~= false) then for key, value in ipairs(alivePlayers) do setElementData(value, "blood", 12000); outputChatBox("Bla Bla Bla", value, 0, 255, 0); end end else outputChatBox("Bla Bla Bla", thePlayer, 255, 0, 0); end end end addCommandHandler("bloodall", restoreAllBlood_CMD, false, false); addEvent("startBloodAllPlayers", true) addEventHandler("startBloodAllPlayers", getRootElement(), restoreAllBlood_CMD)
  24. setTimer( createMarker, 900000, 1 ) You forgot to change that too btw.
×
×
  • Create New...