
Overkillz
Members-
Posts
545 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Overkillz
-
Hey dear guys, Im trying to dxDrawText using values from a table local statusfunctions = {"sMap","sNmap","sTimeL","sTimeP","sNos","sHealth","sPeedo","sFPS","sDeadList","sChat"} local functionleft = {"Display Map Name","Display Next Map Name","Display Time Left","Display Time Passed","Display Nos","Display Health","Display Speedo","Display FPS","Display Dead List","Display Chat"} function xsManager() for i=1,#functionleft do statusfunctions[i] = getElementData(localPlayer,statusfunctions[i]) or "Disabled" dxDrawText(functionleft[i].." - "..statusfunctions[i],sX/2-sizeX/2+fontMaHei,(sY/2-sizeY/2+fontMaHei)+fontMaHei*2*i,0,0,tocolor(40,40,40,255),1,fontManager,"left","top",false,false,false,false) end end addEventHandler("onClientRender",getRootElement(),xsManager) Im getting this error: http://puu.sh/n0LvY/d2f7511fcc.png I hope u can help me, thanks
-
Yeah, I got you, Thanks man.
-
It needs to be inside another function ?
-
These days Im getting stupid problems. IDK why this doesnt work function changelang() outputChatBox("Si functiona") end bindKey( source, "F1", "down", changelang ) Its server side (I wont do it client side) Debugscript says something wrong at bindkey argument 1 I hope u can tell me why it doesnt do that. Regards
-
Mybad, as it is a table and as its not saved in any.xml then you only need to restart admin resource. Regards.
-
Which system ? Im using the default one. Anyways, I think I found a possible solution and its cleaning the table. Anyways, I wait for your answers ...
-
Hey dear guys, I have already mute a lot of guys on my server for several days. There is a way/function to unmute all without seeing them on the server ? Something like clean cache or whatever ? Thanks for all. Regards.
-
By looking at the amount of parameters in his call, he's disabling colorcodes. Therefore the clipping should just work, the only thing that can be wrong is his offsets for the box. Try this; (untested) function testing() dxDrawRectangle ( ( sX / 2 ) - ( sizeX / 2 ), sY - sizeY, sizeX, sizeY, tocolor ( 0, 0, 0, 200 ) ); dxDrawRectangle ( ( sX / 2 ) - ( sizeX / 2 ), sY - sizeY, sizeX, line, tocolor ( 0, 0, 0, 200 ) ); dxDrawText ( songName, ( sX / 2 ) - ( sizeX / 2 ), sY - sizeY, ( ( sX / 2 ) - ( sizeX / 2 ) ) + sizeX, ( sY - sizeY ) + line, tocolor ( 255, 255, 255, 255 ), 1, "defauld-bold", "center", "center", true ); end Thanks it worked, I catch the problem and I have seen how it should work.
-
Im not an exper (Im noob at db functions) but maybe this could be usefull dbExec( connection, "INSERT INTO `VList` (`colum1`, `colum2`) VALUES (`"..value1.."`,`"..value1.."`)" ) Sorry if it didn help u. Regards.
-
Hey dear community, I have a little doubt about clip on dxDrawText. I already saw the function, arguments ...etc however, I couldnt do it. function testing() dxDrawRectangle(sX/2-sizeX/2,sY-sizeY,sizeX,sizeY,tocolor(0,0,0,200)) dxDrawRectangle(sX/2-sizeX/2,sY-sizeY,sizeX,line,tocolor(0,0,0,255)) dxDrawText(Songname,sX/2-sizeX/2,sY-sizeY,sX/2+sizeX/2,sY+sizeY/2,tocolor(255,255,255,255),1,"default-bold","center","center",true,false,false,false) end Variables are already defined. Can someone tell me why the text when it is so big, it still being drawed out the dxDrawRectangle ? I hope you can help me, thanks for all, regards.
-
but 'shade' could affect to everything from the map (I mean shaders which the mappers add to the tables, trees ...etc ) right ?
-
Hey dear community, I have read engineRemoveShaderFromWorldTexture function to create a script that should be easy to do. How ever, it only remove the shader that was already defined by dxCreateShader Well, as might you know, many mappers implements water shaders to their maps (Race) but sometimes it is annoying. Well, my point is delete all water shader by a command how ever, when I want to use that function, I have to set as requiered argument a shader which was already defined. There is a way to get the water shader from the map and remove it ? Thanks.
-
Thanks dude, I didnt know it. #Request to close topic, Marked as: SOLVED
-
Thanks guys, both soultions worked, but, which one was my problem ? The name of function ? It cant be the same as a MTA function ?
-
Hey dear guys, Im having a problem with this easy script IDK why it doesnt work, it is easy to do ... function setGameType(playerSource,commandName,setversus) setGameType ( setversus ) outputChatBox("#dd4040[CW]: #ffffffYou set as Game Type: #ff8800"..setversus, playerSource,255,255,255,true) end addCommandHandler("setvs",setGameType) No errors on debugscript. Regards.
-
Im not sure if this function will work for you, but some weeks ago, I was having problems attaching elements to vehicle, the camera was moved when elements were attached, then an user recommend me to use setCameraClip Sorry if this didnt help u. Regards.
-
In this case, I recommend you use dxDrawImage, because if u want to play with alpha effects, it will suppost you some problems. Also, u can use dxDrawRectangle --& dxDrawImageSection It could be the best way.
-
Hey dear community, Im experimenting a problem with the default race. When I try to pick up any vehicle changer pickup, it doesnt change and it drops me this message function handleHitPickup(pickup) if pickup.type == 'vehiclechange' then if pickup.vehicle == getElementModel(g_Vehicle) then return end local health = nil g_PrevVehicleHeight = getElementDistanceFromCentreOfMassToBaseOfModel(g_Vehicle) alignVehicleWithUp() if checkModelIsAirplane(pickup.vehicle) then -- Hack fix for Issue #4104 health = getElementHealth(g_Vehicle) end setElementModel(g_Vehicle, pickup.vehicle) if health then fixVehicle(g_Vehicle) setElementHealth(g_Vehicle, health) end vehicleChanging(g_MapOptions.classicchangez, pickup.vehicle) elseif pickup.type == 'nitro' then addVehicleUpgrade(g_Vehicle, 1010) elseif pickup.type == 'repair' then fixVehicle(g_Vehicle) end triggerServerEvent('onPlayerPickUpRacePickupInternal', g_Me, pickup.id, pickup.respawn) playSoundFrontEnd(46) end I hope you can help me. Thanks for your time and regards.
-
you can use triggerClientEvent --& triggerServerEvent
-
Thanks dude, then this should works fine ? function simpleInter() local tick = getTickCount() - dxUInterface.pretratick local progress = math.min(tick/5000) if dxUInterface.started then dxUInterface.pretraalpha = interpolateBetween(0,0,0,255,0,0,progress2,"Linear") end dxDrawRectangle(0,0,sX,sY,tocolor(0,0,0,dxUInterface.pretraalpha/1.3)) if getTickCount() - dxUInterface.pretratick > 2000 then removeEventHandler("onClientRender",getRootElement(),simpleInter) end end addEventHandler("onClientRender",getRootElement(),simpleInter) variables are already set.
-
Hey guys, since I started to doing my scripts, to stop the event after being showed ...etc or something similar I use setTimer. However, this function sometimes causes me some problems, I would like to know if I can use another one. like: tick = getTickCount() if tick == 2000 then <-- This should be the seconds statusToChangeSomething = true end I dont know if u got me, well, for example, I use interpolateBetween to do a fade effect on alpha, well, if alpha == 0 then removeEventHandler("Namefunction" ...) end There are ways to do that. Thanks for your time. Regards.
-
All ignored players will be triggered.
-
Another little doubt, If I want to trigger the table, Can I trigger it as a normal value right ? I have this doubt because I have different chatbox functions which uses a different system because are old scripts when I was even more noob at scripting. it should be: triggerEvent ( "onLaconcha", getRootElement(), ignorePlayers [ thePlayer ]) --or triggerEvent ( "onLaconcha", getRootElement(), ignorePlayers)
-
Hey dear community, I have a little doubt, well, lets start with it. Im trying to create an ignore system, well, the problem is that when I insert their names in the table, the table can be check by everybody. well, there is a way to do it just for the local player ? ignorePlayers = {} function setIgnore(thePlayer,cmd,playerIgnored) table.insert(ignorePlayers, playerIgnored) outputChatBox("#ff8800[ignore] #ffffffYou marked as an ignored player to: #ffffff"..playerIgnored,thePlayer,255,255,255,true) end addCommandHandler("ignore",setIgnore) function checkIgnore(thePlayer) for i,v in ipairs(ignorePlayers) do outputChatBox("#04B431#"..i.."#ffffff - Player: #04B431"..v, thePlayer, 255, 255, 255, true) end end addCommandHandler("check",checkIgnore) Thanks for reading, regards.