Gallardo9944
Members-
Posts
442 -
Joined
-
Last visited
Everything posted by Gallardo9944
-
Hello. I've got Debian 7.4 Wheezy with all the latest updates. running 64 bits version. No iptables, no firewalls, nothing special. So, somehow sometimes UDP ports get blocked for 2-5 minutes for all the running servers in. Just all of them. They open periodically for a short amount of time too. TCP is fine though. I'm sure that nobody is blocking the traffic. I've contacted the hoster and there are no problems with that, they have also checked all the rules and UDP isn't blocked. Does anyone have the idea what's going on? I didn't change any networking setting or anything like that.
-
You can simply remove the hander and add it again. Or add a variable which specifies if it's handled or not
-
local x,y = guiGetScreenSize() local scale = x/640 -- It will be 1 with 640, 2 with 1280, ...
-
There is a skin randomizer in play resource. Get rid of it.
-
Yes, onClientRender is a proper way. The explanation is following: GTA is showing its radar each time a player spawns, dies, or whatever. That means a constant hiding is needed.
-
The idea is simple. table.sort can return purely random positions if you are comparing the same things. Remove sorting and you will not experience this. Or just sort it once and for all.
-
use string.split to get arguments from a string. function string.split(s,d) local t = {} local i = 0 local f local match = '(.-)' .. d .. '()' if string.find(s, d) == nil then return {s} end for sub, j in string.gfind(s, match) do i = i + 1 t[i] = sub f = j end if i~= 0 then t[i+1]=string.sub(s,f) end return t end An example: local str = "a,b,c" local vals = string.split(str,",") for i,v in ipairs(vals) do outputChatBox(v) end You also need to tonumber the arguments to get your desired values. But this method... Oh gosh, someone, throw his keyboard out
-
Hello. Try to beat it [] Here's the download link: http://er-mta.net/topic/100-dm-gallardo ... -download/
-
In fact it's similar to xiti's scoreboard. If he sold it, then ask him, if he didn't, we aren't helping with stolen/leaked codes.
-
save it in the SQL depending on the serial number of the player and load it when he joins
-
You might also use the tables for players. Like this way: local states = { } -- YOUR BUTTON PART if states[player] == nil then states[player] = false -- or "true" if you want it to be enabled by default else states[player] = not states[player] end -- SEND CLIENTSIDE But that's just the best way imo. The actual problem might hide clientside. Make sure it triggers the stuff by adding outputChatBoxes to clientside. Also try using DX or anything like that. Also, your images don't have any extension, is that fine? Shouldn't it be some kind of "engine_on.png"?
-
huh, just calculate the position relatively to your guiGetScreenSize values. Like this: local x,y = guiGetScreenSize() local px,py = x-100,y-100 -- will stick to "-100" from any resultion or local x,y = guiGetScreenSize() local px,py = x/2,y/2 -- will keep middle here
-
Okay i found it out myself. Posting the code if someone needs: local vehicle = getPedOccupiedVehicle(localPlayer) local mx,my,mz,mpx,mpy,mpz = getCameraMatrix() local vector = {mx-mpx,my-mpy,mz-mpz} setElementVelocity(vehicle,-vector[1],-vector[2],-vector[3]) It doesn't calculate the difference between velocities, but in fact it does set the direction.
-
The code is pretty much useless cause it doesn't do what expected. Always throws me in 1 direction.
-
well, getting a vector is not a huge deal, but getting the damn velocity... Here's what I have for now: local vehicle = getPedOccupiedVehicle(localPlayer) local mx,my,mz,mpx,mpy,mpz = getCameraMatrix() local vector = {mx-mpx,my-mpy,mz-mpz} And I'm stuck at this point.
-
Hello. I'm looking for a way to make an element "boost" into the direction of the camera. Obviously, it has to be done with matrix stuff. I'm not fond of matrix-related stuff, so yeah, I'd like to set element's velocity to +1 into the camera direction point. Any tips or examples? Thanks in advance.
-
GridCountdown state is triggered when everyone is ready, so everyone is already frozen. Then, as soon as the round starts, everyone is unfrozen. You need to trigger freezing when the round starts, not when it prepares.
-
Full RPG for 50 euro? I don't think it's a fair price though.
-
local variables can't be accessed from the outside of the file, that means they're local, so it results into a faster access (it doesn't have to be looped through _G to be found).
-
Unstested though. local song = playSound("music3.mp3") -- your song local turn = true -- unfaded by default function startFading() turn = false end function stopFading() turn = true end function renderFade() local sounds = getElementsByType("sound") for i,v in ipairs(sounds) do if not (v == song) then -- if it's not your song then local volume = getSoundVolume(v) if turn == true then volume = volume + 0.03 -- fade in 3% each frame else volume = volume - 0.03 -- fade out 3% each frame end if volume > 1.0 then -- volume can't exceed 100% volume = 1.0 elseif volume < 0.2 then -- your minimal volume volume = 0.2 end setSoundVolume(v,volume) end end end addEventHandler("onClientRender",getRootElement(),renderFade)
-
This code doesn't seem to be yours.
-
you can target some player as a pursued one and then kill him and count it as an arrest.
-
True, but for him it isn't important at the moment. It's more important than you think it is. Scripting *badly-designed* codes might become a habit and one might use this all the time. It's very easy to get a bad habit and pretty much difficult to get rid of it. So studying should go on properly, without *easier* workarounds.
-
https://wiki.multitheftauto.com/wiki/GetPedOxygenLevel
-
just change your image path each 5 seconds (with a timer) if you are using dxDrawImage. Or destroy and create new image if you're using guiCreateStaticImage.
