-
Posts
1,273 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GTX
-
A. I do not know. Q. Do you know?
-
A. You said what did i just said ? Q. What did you just said?
-
You also forgot something here: outputChatBox("#FFA824*" .. askdname .. " won " .. wins .. " times and he losed " .. loses .. " times ,his ratio is " .. ratio " and the total time he played is : " .. timePlayed .. ", getRootElement(), 255, 12, 15,true) function publicstatsinfo() local account = getPlayerAccount(source) if isGuestAccount(account) then return end local askdname = getPlayerName(source) local wins = getAccountData(account, "Race Wins") local loses = getAccountData(account, "Race Loses") local ratio = getAccountData(account, "Ratio") local timePlayed = getAccountData(account, "Time played") if loses and wins then outputChatBox("#FFA824*" .. askdname .. " won " .. wins .. " times and he losed " .. loses .. " times ,his ratio is " .. ratio " and the total time he played is : " .. timePlayed, getRootElement(), 255, 12, 15,true) else setAccountData(account, "RaceWins" , 0) setAccountData(account, "RaceLoses" , 0) end end addEvent("stats", true) addEventHandler("stats", getRootElement(), publicstatsinfo)
-
Add this in racevoting_server.lua at the end of the file. addEvent("onMapStarting",true) addEventHandler("onMapStarting",getRootElement(), function() triggerClientEvent("setNextNil", getRootElement()) end)
-
Change some lines in racevoting_server.lua Search for command handler 'nextmap'. addCommandHandler('nextmap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.admingroup) then return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox('Next map set to ' .. getMapName( g_ForcedNextMap ) .. ' by ' .. getPlayerName( player ), g_Root, 0, 240, 0) triggerClientEvent("setNextMap", getRootElement(), getMapName(g_ForcedNextMap)) end )
-
You can't understand... I want to get alpha of the dx text, I need to change the line 28 and 33 at argument 4 in tocolor function. So, I need to get alpha, how?
-
Hello, I changed topic, I need a help with getting alpha. I'll explain: I want to get alpha because I want to make dx text hidding smoothly, so: function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) if alignX then if alignX == "center" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = ax + (bx-ax)/2 - w/2 elseif alignX == "right" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = bx - w end end if alignY then if alignY == "center" then local h = dxGetFontHeight(scale, font) ay = ay + (by-ay)/2 - h/2 elseif alignY == "bottom" then local h = dxGetFontHeight(scale, font) ay = by - h end end local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), tonumber("0x"..col:sub(7, 8))) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), tonumber("0x"..col:sub(7, 8))) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) end end
-
Did you try to re-search whole race resource? EDIT: Try this: respawnVehicle
-
You mean when player is dead then for example he press' button SPACE and then he respawns? Check out https://wiki.multitheftauto.com/wiki/Resource:Race
-
Ah, I forgot to write debug here. Bad argument @ 'logIn' [Expected account at argument 2, got string 'gtx'] - Line 8
-
Hello! I'll explain: When a player with the serial where the serial variable is written joins then the logIn function log in the player automatically. I can't explain better but here is the script: local serial = "serial" local account = "gtx" local password = "password" -- I will not show all the details here function connect() if getPlayerSerial(source) == serial then logIn(source, account, password) else outputChatBox("WELCOME!") end end addEventHandler("onPlayerJoin", getRootElement(), connect)
-
Try this local root = getRootElement() addEventHandler('onGamemodeMapStart', root, function( theMapStarts) local mapName = getMapName theMapRate = call(getResourceFromName("mapratings"), "getMapRating", mapName) outputChatBox ("#CC0000*This map has a rate of ".. theMapRate .."!", 255,255,255, true) end )
-
Well, if is the server local I think the script can't get the country somehow, I can't explain
-
You changed the script? If yes, show it. Are you running the script on a local server?
-
reason2 = " " addEventHandler('onClientPlayerJoin', root, function() outputChatBox('>> ' .. getPlayerName(source) .. ' dołącza do gry !', 0, 159, 255) end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('>> ' .. oldNick .. ' zmienił nick na ' .. newNick, 0, 159, 255) end ) addEventHandler('onClientPlayerQuit', root, function(reason) if reason == "Quit" then reason2 = "Wyszedł" elseif reason == "Kicked" then reason2 = "Wyrzucony" elseif reason == "Banned" then reason2 = "Zbanowany" elseif reason == "Timed Out" then reason2 = "Rozłączono" elseif reason == "Bad Connection" then reason2 = "Błąd połaczenia" end outputChatBox('>> ' .. getPlayerName(source) .. ' opuścił serwer [' .. reason2 .. ']', 0, 159, 255) end )
-
Did you add the script to ACL?
-
A. ? Q. Wtf?
-
A. No. Q. Are you?
-
A. ? Q. You crazy?
-
A. Yes, I do Q. Do you like MAC?