
JoZeFSvK
Members-
Posts
201 -
Joined
-
Last visited
Everything posted by JoZeFSvK
-
Good but all players have 1 colors i want etc. player 1 red player 2 green player 3 yellow ...
-
Lol i dont need timer .. i dont wan chenage carcolors when maps run i want ... changes vehicle color to random color everytime the player spawn
-
When spawn, but colors dont work i see defauld
-
Hey i dont know where is problem debugscript dont says error. Script is good, when player spawn i see dafault car colors... where is these?. Its for gamemode Race. Thank you addEventHandler("onPlayerSpawn",root,function () local vehicle = getPedOccupiedVehicle(source) if vehicle then setVehicleColor(vehicle,math.random(255),math.random(255),math.random(255)) end end)
-
Then i dont know how
-
function ukaz ( ) -- i dont know what put here setTimer ( ukaz, 5000 ) addEventHandler ( "onMapStart", getRootElement(), ukaz )
-
I try but dont work code function ukazcecky () onGamemodeMapStart (showTopTable, ..setTimer (5000) ) end
-
I want when start map that show table but after 5 sec. to hide. like normal race_toptimes. function bindAll(res) if (getResourceName(res) == "Mafin13") then local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do bindKey ( thePlayer, "F2", "down", showTable ) bindKey ( thePlayer, "F3", "down", showCustomSrv, thePlayer ) end end end function bindPL() bindKey ( source, "F2", "down", showTable ) bindKey ( source, "F3", "down", showCustomSrv, source ) end addEventHandler ( "onResourceStart", getRootElement(), bindAll ) addEventHandler ( "onPlayerJoin", getRootElement(), bindPL) gui -- GUI: Top table local accounts = {} local showTop = 0 local alpha = 0 local alpha2 = 0 function createTopList (acc) accounts = acc if (showTop == 0) then showTop = 1 else showTop = 0 alpha = 0 end end addEvent( "showTopTable", true ) addEventHandler( "showTopTable", getLocalPlayer(), createTopList ) addEventHandler("onMapStart", getRootElement(), showTopTable) addEventHandler("onClientPreRender", getRootElement(), function() if (showTop == 1) then if (alpha < 255) then alpha = alpha + 15 end local x,y = guiGetScreenSize() x = x/2-100 y = y/2-200 dxDrawRectangle ( x-10, y-10, 220, 40, tocolor ( 0, 0, 0,200, alpha ) ) -- dxDrawText("Best Players", x, y-5, x+200, y+20, tocolor(255, 255, 255, alpha), "2", "sa-header", "center", "top") dxDrawRectangle ( x-10, y+25, 220, 1, tocolor ( 68, 153, 255,200, alpha,true ) ) --TOTO KURVA dxDrawRectangle ( x-10, y+30, 220, 310, tocolor ( 0, 0, 0,200, alpha ) ) y = y + 35 local pozicia,body = 0 for index, data in ipairs(accounts) do if (index < 21) then if (data.nick == getPlayerName(getLocalPlayer()) ) then dxDrawRectangle ( x-10, y+1, 220, 13, tocolor ( 0, 17, 66, alpha ) ) end dxDrawText(index..".)", x, y, x+25, y+15, tocolor(255, 255, 255, alpha), "1", "default-bold", "left", "center") dxDrawColorText(data.nick, x+25, y, x+150, y+15, tocolor(255, 255, 255, alpha), "1", "default-bold", "left", "center", alpha) dxDrawText(data.points, x+150, y, x+200, y+15, tocolor(255, 255, 255, alpha), "1", "default-bold", "right", "center") y = y + 15 end if (data.nick == getPlayerName(getLocalPlayer()) ) then pozicia = index body = data.points end end y = y + 5 dxDrawRectangle ( x-10, y, 220, 15, tocolor ( 0, 17, 66,200, alpha ) ) dxDrawText(pozicia..".)", x, y, x+25, y+15, tocolor(255, 255, 255, alpha), "1", "default-bold", "left", "center") dxDrawColorText(getPlayerName(getLocalPlayer()), x+25, y, x+150, y+15, tocolor(255, 255, 255, alpha), "1", "default-bold", "left", "center", alpha) dxDrawText(body, x+150, y, x+200, y+15, tocolor(255, 255, 255, alpha), "1", "default-bold", "right", "center") end end ) fileDelete("top.lua")
-
But i dont know how
-
what have jointly Player enter/exit in the vehicle with text position ... problem is in screen resolution
-
Hey i have problem with positions i see this [h1]When my friend connect he see it [/h1] When will problem ? We must edit only text position. local x,y = guiGetScreenSize() --------- POINTY DRAW TEXT ------------------ dxDrawText(pointsCL, x-670, 739, x-100, y, tocolor(255,255,255,255), 1, "default-bold", "left", "top",false,false,true ) ------------- CASH DRAW TEXT------------ dxDrawText(cashCL, x-738, 739, x-100, y, tocolor(255,255,255,255), 1, "default-bold", "left", "top",false,false,true ) and background local screenWidth,screenHeight = guiGetScreenSize() dxDrawImageSection (261, screenHeight - 37, 64, 32, 195, 37, 64, 32, myFile)--Cash bg dxDrawImageSection (325, screenHeight - 37, 64, 32, 131, 37, 64, 32, myFile)--Points bg How to make that all players it see in img bg ? Thank you for your answers.
-
yes, i am not noob but i dont understand some stuff
-
Nope I did not know what to write in racevoting.lua like command but you write abcd... and i write to racevoting.lua and it did and work, so ?
-
I have problem with setnextmap in gui panel, i buy map deduct me money, but not start it map which i buy. I think problem will in racevoting.lua but i add execute command. I dont know what write to racevoting.lua Server: function changeMap(player, mapName, price) local account = getPlayerAccount(player) local cash = getAccountData(account, "mafin.cash") executeCommandHandler("abcd1234", player, mapName) setAccountData(account, "mafin.cash", cash-price) setElementData(player, "Cash", cash-price) outputChatBox("* Next map changed! [#668CFF-"..price.." cash#F53D00]", player, 245, 61, 0, true) outputChatBox("* "..getPlayerName(player).." #F53D00has changed next map to "..mapName, getRootElement(), 245, 61, 0, true) -- blow andromada please if (vehicleID == 592) then setTimer(blowVehicle, 15000, 1, vehicle) end end function updateMapPlz(kto) local compatibleMaps = exports.mapmanager:getMapsCompatibleWithGamemode(exports.mapmanager:getRunningGamemode()) for _, map in pairs( compatibleMaps ) do triggerClientEvent("updateMapList",getRootElement(),kto,getResourceInfo(map, "name") or getResourceName(map)) end end addEvent( "updateMapPlz", true ) addEventHandler ( "updateMapPlz", getRootElement(), updateMapPlz) Client some part from gui: local mapColumn = {} local mapRow = {} local mapList = {} local cash_map = 100 --gui needed = cash_map mapList= guiCreateGridList ( 10, 15, 200, 280, false, CW["tabMap"]) columnMap = guiGridListAddColumn( mapList, "Map name", 0.85 ) CW["labelPriceTelo"] = guiCreateLabel(250,125,100,20,"price: ".. needed .." cash",false,CW["tabMap"]) guiLabelSetColor(CW["labelPriceTelo"], 102, 140, 255) CW["buttonM"] = guiCreateButton(250,145,100,20,"Buy next map!",false,CW["tabMap"]) function() local mapName = guiGridListGetItemText ( mapList, guiGridListGetSelectedItem ( mapList ), 1 ) local amount = cash_map if (mapName == "") then guiSetVisible(CW["C"], false) guiSetVisible(GUI_error["1"], true) elseif (points < tonumber(amount)) then guiSetVisible(CW["C"], false) guiSetVisible(GUI_error["3"], true) else guiSetVisible(CW["C"], false) triggerServerEvent ( "changeMap", getLocalPlayer(), getLocalPlayer(), mapName, cash_map ) guiSetVisible(GUI_error["5"], true) end end, false) addEvent("updateMapList",true) addEventHandler ( "updateMapList", CW["buttonBet"], function(source,mapss) mapRow = guiGridListAddRow ( mapList ) guiGridListSetItemText ( mapList, mapRow, columnMap, mapss, false, false ) end) triggerServerEvent ( "updateMapPlz", getLocalPlayer(),getLocalPlayer())
-
Thank you all for efforts close topic problem solved
-
Thank you, but when i write to true dont work again
-
Hmm i dont know how i cheange it bool= false/true?
-
addEventHandler("onClientRender", getRootElement(), mainDrawing, "true", "high") in this when will true i dont will see image and when will false again i dont will see image ^^
-
when you show me how look boolean then yes
-
Wehn write true or false or high i dont see bg image
-
Hmm i cheange onClientPrerender to onClientRender ^^
-
Dont work