-
Posts
413 -
Joined
-
Last visited
Everything posted by SnoopCat
-
i already fixed , thx!!!
-
its not working whit your help
-
nat working
-
hello i have another problem. i need to move 2 objects when hitting a marker, this is what i did. gMe7 = getLocalPlayer() function waterino1() WTF = createMarker( 5942.1000976563,1276.4000244141,8.8000001907349, "corona", 1, 17, 255, 0, 0) asd1 = createObject (14548, 5942.7001953125 , 1316.6999511719 , 16.200000762939 , 7.2493896484375 , 359.24401855469 , 180.09539794922) WTF2 = createMarker( 5942.1000976563,1276.4000244141,8.8000001907349, "corona", 1, 17, 255, 0, 0) asd2 = createObject (14553, 5943.2001953125 , 11319 , 15.89999961853 , 7.2493896484375 , 359.24401855469 , 180.09539794922) end function MarkerHit ( hitPlayer, matchingDimension ) vehicle = getPedOccupiedVehicle ( hitPlayer ) if hitPlayer ~= gMe7 then return end if source == WTF then moveObject(asd1, 100000, 5906.5 , 3386.6000976563 , 16.200000762939) setTimer(asd1,20000) else if source == WTF2 then moveObject(asd2, 100000, 5906 , 3388.8999023438 , 15.89999961853) setTimer(asd2,20000) end end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), waterino1 ) addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )
-
my sistem uses normal cash sistem cuz when i add money from the panel it gets on the money panel...
-
is there any way to make a scoreboard for the web?
-
Multi Theft Auto "Friends List + chat + Community" on SW
SnoopCat replied to Otto's topic in Suggestions
GREEN , Why not? -
also Race is winning
-
srry for double but that code isnt working i did this Client: local x, y = guiGetScreenSize () local localPlayer = getLocalPlayer() local spectatorSettings = { count = 7, -- how many player names to show, before showing "and x more" charLimit = 19, -- max limit of characters in player name xOffset = 115, -- how far to the left this should be yOffset = (y / 2)-200, -- how far down the screen this should be ~ currently it is almost half way down alwaysShow = true -- whether to show anything if there aren't any players spectating you } local spectators = {} addEvent('addSpectator', true) addEvent('removeSpectator', true) addEventHandler('onClientResourceStart', root, function() triggerServerEvent('addClient', localPlayer) end ) addEventHandler('addSpectator', root, function(spectator) table.insert(spectators, spectator) end ) addEventHandler('removeSpectator', root, function(spectator) for i, val in ipairs(spectators) do if (val == spectator) then table.remove(spectators, i) end end end ) function elementCheck (elem) if elem then if isElement (elem) then if (getElementType (elem) == 'player') then return true end end end return false end function drawColor(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)), 255) 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)), 255) 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 local root = getRootElement() local cash function updateCashVar() cash = getPlayerMoney() end function scriptStarted() setTimer(updateCashVar,1000,0) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), scriptStarted) function drawSpectators() local textX = x - spectatorSettings.xOffset local textY = spectatorSettings.yOffset dxDrawText("MIRANDO: "..tostring(#spectators), textX - 0.2, textY - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") drawColor("#00FF00MIRANDO: #ffffff"..tonumber(#spectators), textX, textY, x, y, tocolor(83, 134, 139), 0.4, "bankgothic") dxDrawText("FPS: "..tostring(getElementData(getLocalPlayer(), "fps")), textX - 0.2, textY + 15 - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") drawColor("#00FF00FPS: #ffffff"..tostring(getElementData(getLocalPlayer(), "fps")), textX, textY + 15, x, y, tocolor(15, 192, 252, 255), 0.4, "bankgothic") dxDrawText("$: "..tostring(cash), textX - 0.2, textY + 15 + 15 - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") drawColor("#00FF00$: #ffffff"..tostring(cash), textX, textY + 15 + 15, x, y, tocolor(15, 192, 252, 255), 0.4, "bankgothic") end addEventHandler("onClientRender",root,drawSpectators) -- Set up variables and settings local x, y = guiGetScreenSize () local localPlayer = getLocalPlayer() local dxDraw = {} local dxDrawOutline = {} local spectatorSettings = { xOffset = (x/6.3), yOffset = y - (y/1.4)} local showSpectators = true function changeSpectatorsEnabled() showSpectators = not showSpectators end local spectators = {} addEvent('addSpectator', true) addEvent('removeSpectator', true) addEventHandler('onClientResourceStart', root, function() triggerServerEvent ('addClient', localPlayer) end) addEventHandler('addSpectator', root, function(spectator) table.insert(spectators, spectator) end) addEventHandler('removeSpectator', root, function(spectator) for i, val in ipairs(spectators) do if (val == spectator) then table.remove(spectators, i) end end end) function elementCheck (elem) if elem then if isElement (elem) then if (getElementType (elem) == 'player') then return true end end end return false end -------------------------------------------------------- function drawSpectators() if showSpectators == true then local textX = x - spectatorSettings.xOffset local textY = spectatorSettings.yOffset scale = getScale(x) dxDrawText("",textX - 1, textY + 1, x, y, tocolor(255,0,0), scale, 'bankgothic') dxDrawText("",textX, textY, x, y, tocolor(255,0,0), scale, 'bankgothic') if not (isPlayerDead(localPlayer)) then if (#spectators > 0) then for i, v in ipairs(spectators) do if elementCheck (v) then local name = getPlayerName(v) if (i) then dxDrawOutline[i] = dxDrawText (" "..string.gsub(name,"#%x%x%x%x%x%x",""), textX - 1, (textY + scale) + (dxGetFontHeight(scale,'bankgothic') * i) + 1.5, x, y, tocolor(0,0,0, 255), scale, 'bankgothic') dxDraw[i] = dxDrawColorText (" "..name, textX, (textY + scale) + (dxGetFontHeight(scale,'bankgothic') * i), x, y, tocolor(255, 255, 255, 255), scale, 'bankgothic') end else table.remove (spectators, k) end end else dxDrawOutline[1] = dxDrawText ("", textX - 1, (textY + scale) + dxGetFontHeight(scale,'bankgothic') + 1.5, x, y, tocolor(0,0,0, 255), scale, 'bankgothic') dxDraw[1] = dxDrawColorText ("", textX, (textY + scale) + dxGetFontHeight(scale,'bankgothic'), x, y, tocolor(255, 255, 255, 255), scale, 'bankgothic') end end end end addEventHandler('onClientRender', root, drawSpectators) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font) 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)), 255) 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)), 255) 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 function getScale(w) local scale = (w*0.5)/1000 return scale end
-
AWESOME!!! thx for making this possibly
-
para poder apagar tu pc y q el server siga nesesitas pagar por uno....
-
maybe he want the blip to show only when ur closer to them and not showing all the time , maybe he wants that only....
-
i will gonna test it
-
not to much that why im asking for an exaple i know that triggerClientEvent call an event from the client side to the server side, Im grong on that?
-
can u make a little exaple plz?
-
soo how i can do it im confused
-
why we should create a new 1 if we can use this one... the thing i need is fix the script...
-
but mine uses gta money system... i know that...
-
yes.but isnt race starter pack but is like that one
-
yup but only on this script cuz real u have 500 but script when maps changes it says u have 0 but rly u have 500
-
srry for double but i rly need help
-
i didnt liked the menu style
-
but maybe he dont want that maybe he wants the image of the country , that script u gives is so simple as look in game comunity resource as countryid....