
drk
Members-
Posts
1,607 -
Joined
-
Last visited
Everything posted by drk
-
Same with FFS, some days ago he posted on forum "Ideas" in FFS forum telling they that he wanna host FFS for 20$ per month and his machine have 4GB of RAM, 4GHz and some other things. Agree with ban too.
-
Put 'elobjecto' as global.
-
If you want, go head, but will be a very hard job. You will need to convert IPL files, replace gta3.img files and the download size will be more than 1gb, I'm sure about this.
-
idk why, btw he need name of folder.. so ok server local lastTimePlayed local month = {"January","February","March","April","May","June","Juli","August","September","October","November","December"} function timestampToDate(stamp) local time = getRealTime(stamp) return string.format("%d %s %02d:%02d",time.monthday,month[time.month+1],time.hour,time.minute) end addEvent("onMapStarting",true) addEventHandler ( 'onMapStarting', root, function ( mapInfo ) local resource = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceInfo ( resource, "name" ) local author = getResourceInfo(exports.mapmanager:getRunningGamemodeMap(),"author") local lastTimePlayed = timestampToDate(mapInfo.lastTimePlayed) local xml = xmlLoadFile("data/ratings.xml") if ( xml ) then local index = findIndexByName ( mapname ) if ( index ) then local map = xmlFindChild ( xml, "map", index ) local rating = xmlNodeGetAttribute ( map, "rating" ) local ratedBy = xmlNodeGetAttribute ( map, "ratedBy" ) local played = xmlNodeGetAttribute ( map, "played" ) triggerClientEvent(source,"INFO",getRootElement(),author,rating,ratedBy,played,lastTimePlayed) else outputChatBox ( "Map not found in our ratings list.", getRootElement(), 255, 0, 0, true ) end else outputChatBox ( "Unable to load map ratings XML file.", getRootElement(), 255, 0, 0, true ) end end ) function findIndexByName ( mapName ) local ratingsFile = xmlLoadFile("data/ratings.xml") if ( ratingsFile ) then for index, map in ipairs ( xmlNodeGetChildren ( ratingsFile ) ) do local name = xmlNodeGetAttribute ( map, "id" ) if ( name == mapName ) then return index -1 end end xmlUnloadFile(ratingsFile) end end He can simply use mapInfo.name -> started map name
-
WHAT THE....... FUUUUUUCK?! What is that?
-
local mapname = getResourceName(map) What is map?
-
If we don't know what's source, how we will help him? And please, stop posting if you don't understand.
-
LOL? Is there any problem is showing us handlers or explain what he are trying to do?
-
I gave him what it seems to be, your and him code makes no sense with no attached command, event, nothing.
-
That's a non-sense script You may want: addCommandHandler ( 'skin', function ( uPed, uCommand, uSkin ) if ( not uSkin ) then return end setElementModel ( uPed, tonumber ( uSkin ) ) outputChatBox ( getPlayerName ( uPed ) .. ' has changed his skin to ' .. uSkin, root, 255, 255, 255, false ) end )
-
Que que adianta postar alguma coisa na area inglesa, lá tem gente muito melhor que você, então não adianta, em nada ficar postando lá, você faz isso para conseguir mais posts, por isso você tem 141 Isso não é uma competição.
-
[AJUDA]MTA Fica branco
drk replied to JDesigner's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Mas o problema dele não é minimizar, é esse bug aí do Map Editor. -
centerWindow isn't a MTASA built-in function -.- You need put it in your code.
-
Where is centerWindow function? Jaysds1, your code will never work
-
race_client.lua Here: addEventHandler('onClientPlayerWasted', g_Root, function() if not g_StartTick then return end local player = source local vehicle = getPedOccupiedVehicle(player) if player == g_Me then if #g_Players > 1 and (g_MapOptions.respawn == 'none' or g_MapOptions.respawntime >= 10000) then if Spectate.blockManualTimer and isTimer(Spectate.blockManualTimer) then killTimer(Spectate.blockManualTimer) end TimerManager.createTimerFor("map"):setTimer(Spectate.start, 2000, 1, 'auto') end else Spectate.dropCamera( player, 1000 ) end end ) Search for 'onClientPlayerWasted'.
-
Server-side: local lastTimePlayed local month = {"January","February","March","April","May","June","Juli","August","September","October","November","December"} function timestampToDate(stamp) local time = getRealTime(stamp) return string.format("%d %s %02d:%02d",time.monthday,month[time.month+1],time.hour,time.minute) end addEventHandler ( 'onMapStarting', root, function ( mapInfo ) local mapname = getResourceInfo(exports.mapmanager:getRunningGamemodeMap(),"name") local author = getResourceInfo(exports.mapmanager:getRunningGamemodeMap(),"author") local lastTimePlayed = timestampToDate(mapInfo.lastTimePlayed) local xml = xmlLoadFile("data/ratings.xml") if ( xml ) then local index = findIndexByName ( mapname ) if ( index ) then local map = xmlFindChild ( xml, "map", index ) local rating = xmlNodeGetAttribute ( map, "rating" ) local ratedBy = xmlNodeGetAttribute ( map, "ratedBy" ) local played = xmlNodeGetAttribute ( map, "played" ) triggerClientEvent(source,"INFO",getRootElement(),mapname,author,rating,ratedBy,played,lastTimePlayed) else outputChatBox ( "Map not found in our ratings list.", getRootElement(), 255, 0, 0, true ) end else outputChatBox ( "Unable to load map ratings XML file.", getRootElement(), 255, 0, 0, true ) end end ) function findIndexByName ( mapName ) local ratingsFile = xmlLoadFile("data/ratings.xml") if ( ratingsFile ) then for index, map in ipairs ( xmlNodeGetChildren ( ratingsFile ) ) do local name = xmlNodeGetAttribute ( map, "id" ) if ( name == mapName ) then return index -1 end end xmlUnloadFile(ratingsFile) end end Client-side: local screenWidth, screenHeight = guiGetScreenSize() local endPosition = screenHeight-140 local moveback = false function getDrawText(mapname,author,rating,ratedBy,played,lastTimePlayed) addEventHandler ( "onClientRender", getRootElement(), drawMapInfo) if mapname then textM = "Map: "..mapname else textM = "Unknown" end if author then textA = "Author: "..author else textA = "Unknown" end if rating then textR = "Rate: " ..rating.. "/10 (by " ..ratedBy.. " players)" else textR = "Not rated yet" end if played then textP = "Times played: "..played.." times" else textP = "Never played before" end if lastTimePlayed then textPL = "Last Time Played\n"..lastTimePlayed else textPL = "Unknown" end end addEvent( "INFO", true ) addEventHandler( "INFO", getRootElement(), getDrawText ) function drawMapInfo () if position == endPosition then if tickCount == 0 then moveback = true end tickCount = tickCount-1 movePosition = 0 end if position >= screenHeight+91 then removeEventHandler("onClientRender",getRootElement(),drawMapInfo) end if moveback then movePosition = -2.5 alpha = alpha - 10 end alpha = alpha + 5 if alpha > 255 then alpha = 255 elseif alpha < 0 then alpha = 0 end local heighResize = dxGetFontHeight(1.15, "default-bold") local widthRezise1 = dxGetTextWidth("Map - "..name,1.15,"default-bold") local widthRezise2 = dxGetTextWidth("Lasttime played - "..lastTimePlayed,1.15,"default-bold") local widthRezise3 = dxGetTextWidth("By - "..author,1.15,"default-bold") if widthRezise1 > widthRezise2 and widthRezise1 > widthRezise3 then widthRezise = widthRezise1 elseif widthRezise2 > widthRezise1 and widthRezise2 > widthRezise3 then widthRezise = widthRezise2 elseif widthRezise3 > widthRezise1 and widthRezise3 > widthRezise2 then widthRezise = widthRezise3 end dxDrawText ( textR,screenWidth/2-150,screenHeight/2+275,684.0,647.0,tocolor(255,255,255,255),1.5,"default-bold","left","top",false,false,false) dxDrawText ( textP,screenWidth/2-150,screenHeight/2+250,636.0,675.0,tocolor(255,255,255,255),1.5,"default-bold","left","top",false,false,false) dxDrawImage(screenWidth/2-200,screenHeight/2+185,420.0,176.0, "images/info_bgr.png",0,0,0,tocolor(200,200,200,alpha)) dxDrawText ( textM,screenWidth/2-150,screenHeight/2+200,636.0,675.0,tocolor(255,255,255,255),1.5,"default-bold","left","top",false,false,false) dxDrawText ( textA,screenWidth/2-150,screenHeight/2+225.0,636.0,619.0,tocolor(255,255,255,255),1.5,"default-bold","left","top",false,false,false) dxDrawText ( textPL,screenWidth/2-150,screenHeight/2+300,684.0,647.0,tocolor(255,255,255,255),1.5,"default-bold","left","top",false,false,false) dxDrawText ( "Mode: Destruction Derby",screenWidth/2-150,screenHeight/2+325,506.0,699.0,tocolor(255,255,255,255),1.5,"default-bold","left","top",false,false,false) position = position - movePosition end
-
Just use: addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == HInv_BTN_Platzieren ) then guiSetVisible ( HInv_Window, false ) textITT() end end ) lol
-
You will need to edit Race mode.