-
Posts
369 -
Joined
-
Last visited
-
Days Won
4
Posts posted by WorthlessCynomys
-
-
Hi! Does debugscript say anything?
Make yourself an ACL admin and type debugscript 3 into the F8 console.
-
Hali! Van bedugva kormány vagy joystick? Az szokta ezt csinálni.
- 1
-
local example = "an example string" for i in string.gmatch(example, "%S+") do print(i) end -- output: -- an -- example -- string
Annyi a dolgod, hogy a gmatch stringjét átírod. Szerintem ha a gmatch-nek "-"-t adsz meg értéknek, akkor jól fogja felbontani. Aztán tömmbe rakod.
-
You can use getElementType for that. It returns a string that you can compare in an if.
if getElementType(element) == "player" then -- Do something end
This does something when the element is a player.
-
Hali! Tudtommal ez azért lesz nehéz, mert a fegyverek nem úgy elérhető modelek mint a járművek mondjuk. Körbe nézek, hátha találok valamit a kérdésre azért.
-
local gOutput = true; function writeStuff() if (gOutput) then outputChatBox("1"); else outputChatBox("2"); end gOutput = not gOutput; end addCommandHandler("stuff", writeStuff);
- 1
-
1 minute ago, xFabel said:
i wanna do like something start first
local gOutput = false
but i forget...
can u remember it to me? excuse
Can you explain it better?
-
local number = 1; function writeNumber() outputChatBox(number); number = number + 1; end addCommandHandler("number", writeNumber);
-
function adminchat ( thePlayer, _, ... )
local message = table.concat ( { ... }, " " )
if ( isPlayerOnGroup ( thePlayer ) ) then
for _, player in ipairs ( getElementsByType ( "player" ) ) do
if ( isPlayerOnGroup ( player ) ) then
outputChatBox ( "#7CC576[AdminChat] Tulajdonos #FFFFFF ".. getPlayerName ( thePlayer ) ..": ".. message, player, 255, 255, 255, true )
end
end
end
end
addCommandHandler ( "a", adminchat ) -
Hy! If you look at the Wiki page of onPlayerLogin, It shows that this gives you the current and previous account as arguments, meaning you don't have to getPlayerAccount, because you already get It from the event.
Command handler works because It provides you a player instead of an account, so you have to get the account.
- 1
-
11 minutes ago, Hugos said:
Well. Can you tell me more about how to make the dimensions of the picture "guiCreateStaticImage" relative?
If you set relative to true, then you have to provide values from 0.0 to 1.0 (think of them as percentages 0-100 of the parent element). So the first element you draw is relative to the parent which is the screen, so the first element is relative to the screen. The second element as the child (part) of the first is relative to the first one. That's all. That applies to all CEGUI elements, including staticImage.
- 1
-
guiCreateStaticImage makes a CEGUI element.
dxDrawImage draws an image with the lifetime of a frame. You have to call dx functions on every frame.
- 1
-
teaEncode encrypts data. base64 is easily decryptable by anyone.
-
1 minute ago, gubi said:
Of course it changes the size.
Original file size: 3.07 MB (random generated text)
encodeString: 3.07 MBencodeString with base64: 4.10 MBteaEncode: 4.10 MBteaEncode with base64: 5.46 MB
That's a fair point.
- 1
-
Hi!
teaEncode and encodeString are the same. encodeString uses teaEncode.
Base64 creates a uniqe character sequence out of data, which can be decoded to retrieve the data. It just makes files into characters and vice versa. Size does not change. It has to store the same amount of data, It's just a string now.
1st answer.
- 1
-
-
-
So basically you need an ID system.
Simplest way: Set up an array and whenever a player joins run a cycle to find an empty spot in the table. First player enters, cycle runs, finds that the first spot in the array (which is 1) is empty, puts the player there. Next player will find the second spot. First player leaves, you empty this spot, and you're pretty much done.
-
There's literally a:
getAllElementData
function
-
Hy! You have to put the dx functions in an onClientRender event. dx draws only live for a frame, therefor you have to draw them on every frame. That's what the onClientRender event does.
If you need further help, send me a PM and I'll help in hungarian.
-
Hy. Try:
#getPedWeapons
On number indexed tables/arrays # returns the count of values in an array.
-
-
Hali!
Legközelebb használd a code beszúrást (<> jel fent).
local sound1 = playSound3D("abc.mp3",1871.4547119141, -1372.5979003906, 16.135135650635, true) setSoundVolume(sound1, 30.0) setSoundSpeed(sound1, 1.0) setSoundMaxDistance (sound1, 700) setElementDimension( sound1, 0 ) setElementInterior( sound1 , 0 ) local sound2 = playSound3D("abc.mp3",1887.8804931641, -1372.5979003906, 16.135135650635, true) setSoundVolume(sound2, 30.0) setSoundSpeed(sound2, 1.0) setSoundMaxDistance (sound2, 700) setElementDimension( sound2, 0 ) setElementInterior( sound2 , 0 )
Na de a problémádra a megoldás, hogy le tudod kérdezni a hangnak a jelenlegi időpontját, hogy hol tart. Így össze tudod hangolni a hangokat.
getSoundPosition() setSoundPosition()
-
I do not understand what you want to achieve. Please provide further explanation of your goal so I/others can understand It and become able to help you!
[HELP] Count vehicle acceleration from 0 to 100km/h
in Scripting
Posted
With enough testing and tweaking I'm sure it is possible, however you can cheat. You can create every vehicle with a ped in it, give them a forwards control state and measure the time it takes them to accelerate to 100 km/h. This is a way easier solution. Do it with 20 peds in 20 vehicles in the same time and it should be quick enough to do it every now and then.