Jump to content

GrubaS

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by GrubaS

  1. GrubaS

    Help guys :/

    it's not the same?? how u know it?? If i can only max 1280 x 1024?
  2. GrubaS

    Help guys :/

    It's my, it's my friend,
  3. GrubaS

    Help guys :/

    lol, can u open mta? i can show u if yes come server [G*M] Ganja
  4. GrubaS

    Help guys :/

    I trying to make example: I have nick Nitro and i used command /getvideo Caddy and it's showing in gui but nick Nitro not his nick (Caddy)
  5. GrubaS

    Help guys :/

    spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "", false) guiSetVisible(spawnScreenMenu, false) guiWindowSetSizable(spawnScreenMenu, false) guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") przycisk = guiCreateButton(10, 385, 50, 20, "Close", false, spawnScreenMenu) guiSetFont(przycisk, "default-bold-small") owner = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) guiSetFont(owner, "clear-normal") guiWindowSetMovable ( spawnScreenMenu, true ) guiWindowSetSizable ( spawnScreenMenu, false ) spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) guiGridListSetSelectionMode ( spawnScreenGridList, 2 ) guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) addEvent("getResInfo", true) addEventHandler("getResInfo", resourceRoot, function() --------------------------------------------------------------------- local sw,sh = guiGetScreenSize() local info = dxGetStatus() table_info = {} table_info1 = {} guiSetText(spawnScreenMenu,getPlayerName(localPlayer)) table.insert(table_info,{"Screen Width",sw}) table.insert(table_info,{"Screen Height",sh}) for i ,v in pairs (info ) do table.insert(table_info,{i,v}) end triggerServerEvent("send:data",resourceRoot,table_info) end) addEvent("openWindow", true) addEventHandler("openWindow", resourceRoot, function(info) guiGridListClear (spawnScreenGridList) guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) showCursor ( guiGetVisible ( spawnScreenMenu ) ) guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) for k, v in ipairs( info ) do local row = guiGridListAddRow ( spawnScreenGridList ) guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring(v[2]), false, false ) guiGridListSetItemText ( spawnScreenGridList, row, 1, tostring(v[1]), false, false ) end end)
  6. GrubaS

    Help guys :/

    Hello again, I have problem as u can see on ss "test" i used guiSetText(spawnScreenMenu,getPlayerName(localPlayer)) why its showing my nick when i geting other players video?
  7. GrubaS

    Debug Problem

    now, server.lua:5: Bad argument @ 'getElementModel' [Expected element at argument 1, got number '49.5']
  8. GrubaS

    Debug Problem

    Hello, I have problem bcz when someone is dead then spaming in debugscript 3 server.lua:5: Bad argument @ 'getElementModel' [Expected element at argument 1, got boolean] function cheetah(veh) for i ,v in ipairs (getElementsByType("player")) do veh = getPedOccupiedVehicle(v) local id = getElementModel ( veh ) if id == 415 then if getElementData(v,"state") == "alive" then local handling = getVehicleHandling(veh) if handling["mass"] ~= 1200 or handling["turnMass"] ~= 3000 then outputChatBox(getPlayerName(v).."#FA6400's mass: #FFBF961200 #FA6400/ #780000"..handling["mass"], root, 255,100,0,true) outputChatBox(getPlayerName(v).."#FA6400's turn mass: #FFBF963000 #FA6400/ #780000"..handling["turnMass"], root, 255,100,0,true) end end end end end addEventHandler("onVehicleDamage", getRootElement(), cheetah)
  9. GrubaS

    Help guys :/

    It's working Thanks guy for help! Thanks You Very Much
  10. GrubaS

    Help guys :/

    Hello, I have problem its with 23 line. Look on ss, "AllowScreenUpload" cant check bcz bad argument Whats wrong? addEventHandler("onClientResourceStart", resourceRoot, function() spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "test", false) guiWindowSetSizable(spawnScreenMenu, false) guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") spawnScreenOKButton = guiCreateButton(10, 385, 50, 20, "Close", true, spawnScreenMenu) guiSetFont(spawnScreenOKButton, "default-bold-small") GUIEditor.label[1] = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) guiSetFont(GUIEditor.label[1], "clear-normal") guiWindowSetMovable ( spawnScreenMenu, false ) guiWindowSetSizable ( spawnScreenMenu, false ) --------------------------------------------------------------------- spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) guiGridListSetSelectionMode ( spawnScreenGridList, 2 )--ensure the selection mode is one per column guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) local info = dxGetStatus() for k, v in pairs( info ) do --add a new row to our gridlist each time local row = guiGridListAddRow ( spawnScreenGridList ) --get our new row --next, we set that rows text to the weapon name. Column is 1 since the "Shotguns" column was created first. guiGridListSetItemText ( spawnScreenGridList, row, 2, v, false, false ) guiGridListSetItemText ( spawnScreenGridList, row, 1, k, false, false ) end row = 0 end ) Please Help,
  11. debug: Bad Argument @ 'xmlFindChild' [Expected number at armugent 3, got none] Bad Argument @ 'xmlNodeGetValue' [Expected xml node at argument 1, got boolean
  12. lua working but what about XML? "41EF67910EADFD0C8F6528FFDA695DA3" />
  13. Hello, guys i want make script, if player with serial "XXXXXXXXXXXXXXX" then he can use the command /test i want make it in xml bcz i'll decompile server-side server-side: function test1(source) local serial = getPlayerSerial(source) local rNode = xmlLoadFile("serials.xml") xmlNodeGetValue (xmlFindChild ( rNode, "Serial"), ""..serial.."" ) if rNode then outputChatBox("#00ff00test", r, g, b, thePlayer, true) end addCommandHandler("test", test1) addEventHandler ( "onPlayerJoin", getRootElement(), test1)
  14. Client Side, local players = getElementsByType("player") local gme = getLocalPlayer () local x,y = guiGetScreenSize () local addedTeams = {} local addedMaps = {} local addedMapsEdit = {} local countTable = {} local countTableEdit = {} local alivept = {} local showTeams = false local defaultRounds = "5" function openCloseWindow (maps) mapsTable = maps if not guiGetVisible(addsWindow) then guiSetVisible(addsWindow,true) showCursor(true) local r, g, b if getPlayerTeam(gme) then r, g, b = getTeamColor(getPlayerTeam(gme)) else r, g, b = 255, 255, 255 end --callServerFunction("outputChatBox","* "..getPlayerName(gme).."#ffffff opened CWShit window", root, r, g, b,true) fillingColumns() else guiSetVisible(addsWindow,false) showCursor(false) --fillingColumns() end end function fillingColumns() guiGridListClear(teamsList) local teams = getElementsByType("team") for i, v in ipairs (teams) do row = guiGridListAddRow ( teamsList ) guiGridListSetItemText (teamsList, row, 1, getTeamName(v), false, false) end -------- guiGridListClear(teamsList2) for i, v in ipairs (addedTeams) do row = guiGridListAddRow (teamsList2) guiGridListSetItemText (teamsList2, row, 1, getTeamName(v), false, false) guiGridListSetItemText (teamsList2, row, 2, countTable[getTeamName(v)], false, false) end -------- guiGridListClear(mapsList) if mapsTable then for i, v in ipairs (mapsTable) do row = guiGridListAddRow ( mapsList ) guiGridListSetItemText (mapsList, row, 1, mapsTable[i], false, false) end end -------- guiGridListClear(mapsList2) --outputChatBox(#addedMaps.." "..#addedMapsEdit) for i, v in ipairs (addedMaps) do row = guiGridListAddRow (mapsList2) guiGridListSetItemText (mapsList2, row, 1, v, false, false) end -------- end addsWindow = guiCreateWindow(520,20,450,400,"CWShit",false) tabPanel = guiCreateTabPanel ( 0, 0.065, 1, 1, true, addsWindow ) tabTeams = guiCreateTab( "Teams", tabPanel ) tabMaps = guiCreateTab( "Maps", tabPanel ) guiSetVisible(addsWindow, false) ------------ teamsList = guiCreateGridList(0.04, 0.04, 0.44, 0.92,true,tabTeams) guiGridListSetSelectionMode(teamsList, 2) teamsColumn = guiGridListAddColumn(teamsList,"Teams",1) guiGridListSetColumnWidth ( teamsList, teamsColumn, 0.9, true ) saveButton1 = guiCreateButton(0.52,0.88,0.31,0.08,"Save",true,tabTeams) closeButton1 = guiCreateButton(0.86,0.88,0.1,0.08,"X",true,tabTeams) ------------ teamsList2 = guiCreateGridList(0.52, 0.04, 0.44, 0.66,true,tabTeams) guiGridListSetSelectionMode(teamsList2, 1) addedTColumn = guiGridListAddColumn(teamsList2,"Added teams",1) countColumn = guiGridListAddColumn(teamsList2,"Count", 2) guiGridListSetColumnWidth ( teamsList2, addedTColumn, 0.61, true ) guiGridListSetColumnWidth ( teamsList2, countColumn, 0.2, true ) minusCountButton = guiCreateButton(0.52,0.74,0.08,0.085,"-",true,tabTeams) countEdit = guiCreateEdit(0.63, 0.74, 0.095, 0.08,"", true, tabTeams) guiEditSetMaxLength (countEdit, 2 ) plusCountButton = guiCreateButton(0.75,0.74,0.08,0.085,"+",true,tabTeams) ------------------------------------------------------------------ searchBox = guiCreateEdit(0.04, 0.04, 0.44, 0.06, "Search", true, tabMaps) mapsList = guiCreateGridList(0.04, 0.13, 0.44, 0.83,true,tabMaps) guiGridListSetSelectionMode(mapsList, 2) guiGridListAddColumn(mapsList,"Maps",1) guiCreateLabel ( 0.76, 0.79, 0.3, 0.05, "rounds:", true, tabMaps) roundsEdit = guiCreateEdit(0.86, 0.78, 0.095, 0.07, roundsOnMap or defaultRounds, true, tabMaps) guiEditSetMaxLength (roundsEdit, 2 ) saveButton2 = guiCreateButton(0.52,0.88,0.31,0.08,"Save",true,tabMaps) closeButton2 = guiCreateButton(0.86,0.88,0.1,0.08,"X",true,tabMaps) downButton = guiCreateButton(0.52,0.78,0.1,0.08,"Down",true,tabMaps) upButton = guiCreateButton(0.634,0.78,0.1,0.08,"Up",true,tabMaps) ------------ mapsList2 = guiCreateGridList(0.52, 0.04, 0.44, 0.7,true,tabMaps) guiGridListSetSelectionMode(mapsList2,2) guiGridListAddColumn(mapsList2,"Added maps",1) addEventHandler("onClientGUIChanged", searchBox, function(element) for id, gamemode in pairs ( aGamemodeMapTable ) do if ( gamemode.name == "Race" ) then for id, map in ipairs ( gamemode.maps ) do if string.find ( string.lower ( map.name ), string.lower ( guiGetText(mapsearch):lower ( ) ), 0, true ) ~= nil then end end end end end ) addEventHandler( "onClientGUIDoubleClick", teamsList, function() local selectedRow, selectedCol = guiGridListGetSelectedItem( teamsList ) local selectedTeam = guiGridListGetItemText( teamsList, selectedRow, selectedCol ) if selectedTeam then table.insert (addedTeams, getTeamFromName (selectedTeam)) row = guiGridListAddRow (teamsList2) guiGridListSetItemText (teamsList2, row, 1, selectedTeam, false, false) end end, false ) addEventHandler( "onClientGUIDoubleClick", teamsList2, function() local selectedRow, selectedCol = guiGridListGetSelectedItem( teamsList2 ) local selectedTeam = guiGridListGetItemText( teamsList2, selectedRow, selectedCol ) table.remove (addedTeams, selectedRow+1) guiGridListRemoveRow (teamsList2, selectedRow) end, false ) addEventHandler( "onClientGUIClick", root, function() if source == closeButton1 or source == closeButton2 then openCloseWindow () elseif source == saveButton1 then if addedTeams[2] then for i, team in ipairs (addedTeams) do if not countTableEdit[getTeamName(team)] then countTableEdit[getTeamName(team)] = 0 end end countTable = countTableEdit callServerFunction("serverAddTeamsCount", gme, addedTeams, countTable) else outputChatBox ("*#E01B2F Error:#ffffff You need add minimum 2 teams", 255, 255, 255, true ) end elseif source == saveButton2 then if addedMapsEdit[1] then local rounds = nil if guiGetText (roundsEdit) > "0" then rounds = tonumber(guiGetText (roundsEdit)) end -- addedMaps = addedMapsEdit callServerFunction("serverAddMapsRounds", gme, addedMapsEdit, rounds or defaultRounds) else outputChatBox ("*#E01B2F Error:#ffffff .", 255, 255, 255, true ) end elseif source == teamsList2 then selectedRow, selectedCol = guiGridListGetSelectedItem( teamsList2) selectedTeam = guiGridListGetItemText( teamsList2, selectedRow, selectedCol ) if countTableEdit[selectedTeam] then guiSetText (countEdit, countTableEdit[selectedTeam] ) end elseif source == plusCountButton and countTableEdit[selectedTeam] then countTableEdit[selectedTeam] = countTableEdit[selectedTeam] + 1 guiSetText (countEdit, countTableEdit[selectedTeam]) guiGridListSetItemText (teamsList2, selectedRow, 2, guiGetText (countEdit) , false, false) elseif source == minusCountButton then countTableEdit[selectedTeam] = countTableEdit[selectedTeam] - 1 guiSetText (countEdit, countTableEdit[selectedTeam]) guiGridListSetItemText (teamsList2, selectedRow, 2, guiGetText (countEdit) , false, false) elseif source == upButton then local selectedRow, selectedCol = guiGridListGetSelectedItem( mapsList2 ) local selectedMap = guiGridListGetItemText( mapsList2, selectedRow, selectedCol ) if selectedMap and selectedRow >= 1 then addedMapsEdit[selectedRow+1], addedMapsEdit[selectedRow] = addedMapsEdit[selectedRow], addedMapsEdit[selectedRow+1] row = guiGridListInsertRowAfter(mapsList2, selectedRow-2) guiGridListSetItemText (mapsList2, row, selectedCol,selectedMap, false, false) guiGridListRemoveRow (mapsList2, selectedRow+1) end elseif source == downButton then local selectedRow, selectedCol = guiGridListGetSelectedItem( mapsList2 ) local selectedMap = guiGridListGetItemText( mapsList2, selectedRow, selectedCol ) if selectedMap and selectedRow >= 0 and selectedRow < #addedMapsEdit-1 then addedMapsEdit[selectedRow+1], addedMapsEdit[selectedRow+2] = addedMapsEdit[selectedRow+2], addedMapsEdit[selectedRow+1] row = guiGridListInsertRowAfter(mapsList2, selectedRow+1) guiGridListSetItemText (mapsList2, row, selectedCol,selectedMap, false, false) guiGridListRemoveRow (mapsList2, selectedRow) end end end) addEventHandler( "onClientGUIDoubleClick", mapsList, function() local selectedRow, selectedCol = guiGridListGetSelectedItem( mapsList ) local selectedMap = guiGridListGetItemText( mapsList, selectedRow, selectedCol ) if selectedMap then table.insert (addedMapsEdit, selectedMap) row = guiGridListAddRow (mapsList2) guiGridListSetItemText (mapsList2, row, 1, selectedMap, false, false) end end, false ) addEventHandler( "onClientGUIDoubleClick", mapsList2, function() local selectedRow, selectedCol = guiGridListGetSelectedItem( mapsList2 ) local selectedMap = guiGridListGetItemText( mapsList2, selectedRow, selectedCol ) table.remove (addedMapsEdit, selectedRow+1) guiGridListRemoveRow (mapsList2, selectedRow) end, false ) function refreshMapsRounds (maps, rounds) addedMaps = maps addedMapsEdit = maps roundsOnMap = rounds guiSetText (roundsEdit, roundsOnMap) fillingColumns() end function refreshTablichka(teamsTable, count, state) addedTeams = teamsTable countTable = count --countTableEdit = count showTeams = state fillingColumns() end --function checkAfk() --end function startMapClient () for i, team in ipairs (addedTeams) do alivept[getTeamName(team)] = 0 end end addEventHandler ( "onClientPlayerVehicleEnter", root, function () if
  15. http://zapodaj.net/images/f5db9aac48a20.png try it or http://zapodaj.net/f5db9aac48a20.png.html
  16. setTimer( function ( p,c,thePlayer) local target = getPlayerFromPartialName(thePlayer) if target then local handling = getVehicleHandling(target) if handling > 1200 then outputChatBox(getPlayerName(target).." - mass: "..handling[1]) end end end, 2000, 1) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end
  17. What's wrong? i can search maps debugscript 3: Lua Code: addEventHandler("onClientGUIChanged", searchBox, function(element) for id, gamemode in pairs ( aGamemodeMapTable ) do if ( gamemode.name == "Race" ) then for id, map in ipairs ( gamemode.maps ) do if string.find ( string.lower ( map.name ), string.lower ( guiGetText(mapsearch):lower ( ) ), 0, true ) ~= nil then end end end end end )
  18. Hey, guys I have a question about function. I want make script, if player change his car mass then it will be show on outputchatbox "Player changed mass "car mass".
  19. GrubaS

    [HELP] Sirens

    I want make, if points is 100 / 300 / 400 then on my car will be "School Driver" but when points will be more than 1000 then it will be car without "school driver" ps. sry for english ;x function setMyVehiclesVariant() if (tonumber(getElementData(source,"points")) = 1000) then local wasSet = setVehicleVariant(source, 0, 255) else local wasSet = setVehicleVariant(source, 255, 255) end end addEventHandler ( "onVehicleEnter", root,setMyVehiclesVariant)
  20. GrubaS

    [HELP] Sirens

    Hello Guys, I want make this script for Cheetah (id=419) and only for admins, How do it? addEventHandler("onVehicleEnter",root,function(player,seat) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then if(player)and(seat==0)then addVehicleSirens(source,1,2) setVehicleSirens(source,1, 0.4, -0.2, 0.6, 0, 0, 255, 255, 255) addVehicleSirens(source,2,2) setVehicleSirens(source,2, -0.4, -0.2, 0.6, 255, 0, 0, 255, 255) end end end) addEventHandler("onVehicleExit",root,function(player,seat) if(player)and(seat==0)then removeVehicleSirens(source) end end)
  21. GrubaS

    [HELP] Sirens

    kk i made it, thanks for helps
  22. GrubaS

    [HELP] Sirens

    Hello , I've got a dff file with 3 different objects in chassis_dummy , extra1 - 'driving school' plate placed on the cheetah extra2 - sirens placed on the cheetah also extra3 - normal cheetah Now the question is how can i make extra2 only for Admins , so if the player was in the group 'Admin' then he will have siren on his cheetah. Any help would be greatly appreciated.
  23. GrubaS

    [HELP] Sirens

    Hello, How i can make sirens like on this ScreenShot?
  24. GrubaS

    [HELP]

    Hello, Debug 3: " Bad argument @ 'setElementHealth" [Expected element at argument 1, got number '0'] " whats wrong? setTimer ( function ( player ) for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then setElementHealth(0) end end end , 1000, 0 )
  25. Hello, whats function to set all DD maps to RS? (Respawn) meta: <?xml version="1.0" encoding="utf-16"?> type="map" gamemodes="race" name="[DD] Atmosfera" author="|GMC|Zaya" description="Visit GMC Server. Our site: [url=http://www.gmc-game.com]www.gmc-game.com[/url]" /> "[DD] Atmosfera.map" /> "#time" value="7:0" /> "#weather" value="6" /> "#respawn" value="none" /> "#duration" value="700" /> and how i can edit with script?
×
×
  • Create New...