
karlis
Members-
Posts
1,314 -
Joined
-
Last visited
Everything posted by karlis
-
it should be possible by stacking many image sections and making round shape out of it.
-
ok, should work dxDrawImage (x-100,100,36,35,getElementData(localP,"overrideCollide.uniqueblah") and "ghostmodeon.png" or "ghostmodeoff.png") if the images are inverted, just invert the image path.
-
403 - forbidden error. please upload to something like tinypic.com imageshack.com
-
oh, theres a inf loop, fixing it. anyway you need the setname so you won't see the colorcodes in the textdraw EDIT:heres the fix countless more edits:optimizng function process() players=getElementsByType("player") for _,v in pairs(players) do processPlayer(v) end end function processPlayer(p) local Player=source or p local nick=getPlayerName(Player) local newnick=nick:gsub("#%x%x%x%x%x%x","") local colorcode=nick:match("^#%x%x%x%x%x%x") if newnick~=nick then setPlayerName(Player,newnick) if colorcode then local red,green,blue=getColorFromString(colorcode) setPlayerNametagColor(Player,red,green,blue) end end end addEventHandler("onResouceStart",getResourceRootElement(),process) addEventHandler("onPlayerJoin",getRootElement(),processPlayer) addEventHandler("onPlayerChangeNick",getRootElement(),processPlayer)
-
say where you want it to be, we will sort it.
-
but how you think, using this + additional rectangles that make ring shape with offset rotation pos would work good?
-
please use [ lua] code here [/lua] (whithout the space at front) or [/code] this have to be in clientside, in nametags.lua i suppose. ... local r,g,b=getPlayerNametagColor(player) dxDrawText (getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) ... and this have to be serverside, in other script file. function process() players=getElementsByType("player") for _,v in pairs(players) do processPlayer(v) end end function processPlayer(p) local Player=source or p local nick=getPlayerName(Player) local colorcode=nick:match("^#%x%x%x%x%x%x") if colorcode then local red,blue,green=getColorFromString(colorcode) setPlayerNametagColor(Player,red,blue,green) end setPlayerName(Player,nick:gsub("#%x%x%x%x%x%x","")) end addEventHandler("onResouceStart",getResourceRootElement(),process) addEventHandler("onPlayerJoin",getRootElement(),processPlayer) addEventHandler("onPlayerChangeNick",getRootElement(),processPlayer) [code=lua] code here
-
then support this suggestion viewtopic.php?f=102&t=26812 anyway, i cant do it all for you, but if u get stuck/need assistance, feel free to ask
-
making yet another hud resource? EDIT:wont also be that hard, remember this function: radius^2=x^2+y^2, and you can generate the size even with pretty good preciseness but this works assuming x and y is 0 at the center of ring.
-
only thing i could think about is to use alot of dxDrawImageSection to make close to circular shape, then using pretty fat border ring to hide the not-preciseness of that shape.
-
you used that code i made serverside, then put tag color to dxdrawtext?
-
snippet taken from wiki example. root = getRootElement ( ) -- Store all the players in the server into a table players = getElementsByType ( "player" ) function ResourceStart ( name, root ) for k,v in ipairs ( players ) do -- for all the players in the table setPlayerNametagShowing ( v, false ) -- turn off their nametag end end addEventHandler ( "onResourceStart", root, ResourceStart ) function PlayerJoin () -- Whoever joins the server should also have their nametags deactivated setPlayerNametagShowing ( source, false ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin )
-
i think both elements should be streamed in before the attaching. use setElementStreamable(arrow1,flase) setElementStreamable(hitElement,flase)
-
this makes zero sense, nor vehicle color id works on nicks, nor vehicles work on rgb(until 1.1). and the fact is HE DIDNT EVEN ASK FOR VEHICLE COLOR
-
i did understand that all the time, just thought its overwritten after that, as i said, nvm, sorry for that.
-
do you want it to be set amount of pixels from some corners, or relative to size of screen?
-
wait, isn't the source defined anywhere else? oh i see, sry, tought he did define smthing like source=... edit: so this should still work just fine firstspawn={ } function player_Spawn () if (not firstspawn[source]) then firstspawn[source] = true givePlayerMoney ( source, 10000 ) local blip = createBlipAttachedTo (source, 56) setElementVisibleTo ( blip, source, false ) end giveWeapon (source, 31, 400) giveWeapon (source, 26, 200) giveWeapon (source, 9, 1) giveWeapon (source, 29, 400) end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn )
-
thats exact reason you don't want to use source as any other arguments, cuz it overwrites normal ones. and forget this: players = getElementsByType ( "player" ) for k, v in ipairs(players) do if(v ~= source) then setElementVisibleTo ( blip, v, true ) end end this is not needed, it is set visible by default.
-
not sure, but maybe it doesn't like that you try to attach already attached object.
-
maybe try not syncing everything, but only thing you actually need for example, when browsing infernus handling configurations, sync only them, not allvehicles. also, as we all know, xml isn't compact data storage, you could compress the data in much smaller string, then send it, and decode clientside.(for example, not having to send "", but just "something;something else".
-
first, pelase use tags!its much easier to help you then. 2)what is cH, show full script
-
ok try this add the script i showed before serverside, and then do this: r,g,b=getPlayerNametagColor(player) dxDrawText (getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false )
-
but i showed you how to get the r g b out of hex string, (need to be server side tough), use that, then transfer r g b to client, and then tocolor(r,g,b,255) for setting color. but keep the gsub + setname at serverside script.
-
thanks i see no big mistakes only thing that is additional not needed is meta file describing, but it shouldn't affect it. <meta> <info author="TechG9" name="Infernus" version="1.0.5" type="script"/> <script src="vehicle.lua" type="client"/> <file src="infernus.txd" /> <file src="infernus.dff" /> </meta> also maybe try compressing "glassa" texture inside the txd archive, but i think mta would support uncompressed too. no other ideas.