Anderl
Members-
Posts
2,266 -
Joined
-
Last visited
Everything posted by Anderl
-
Well, that's a way. I still think getting cursor position is easier.
-
I just tested your script, it works fine: local ship = createObject( 10771, 105.09999847412, 266.20001220703, 5, 0, 0, 0 ); failureTimer = setTimer( function() if ( true and true and true ) then setTimer( function() local x, y, z = getElementPosition( ship ); moveObject( ship, 1000, x, y, z - 30 ); end, 1000, 0 ) end end, 1000, 1 ) Meta.xml: <meta> <script src="script.lua" type="server"/> </meta>
-
Where is "charpos" table defined?
-
@CrystalMV, I guess that ain't needed since onClientClick already passes absolute X and Y.
-
We won't make scripts for you. Learn & try something and we can help you FIXING errors.
-
guiGridListGetItemData
-
The problem is that there's no such "F-22 Raptor" plane. You can "by-pass" that by setting item data to the plane's model and its text to the real name of it and then sending the item data to the server event instead of using getVehicleModelFromName.
-
Whatever.
-
No one said it is a typing error. Show the WHOLE code.
-
Where is gridlist event? Where is the code which spawns the vehicles?
-
I'm for the first time finishing GTA Vice City ( actually, I already finished main missions, killed Sonny and all these things. But I'm buying properties and doing their missions and I still need to do Phill missions - Somehow I'm still at 41% or something close to that ). I didn't know these old GTAs were that nice.
-
It ain't hard if you know how to do it. If you have any idea how could you start, then it will be really easy.
-
^ Not wanting to make you give up of that but I don't know who could use this with such code. This is a mess. 1. You forgot to use local variables; Well, that ain't gonna make the script not work, but local variables should be used. 2. You should use global variables for variables like "take" in your script. 3. "k" table ain't needed. 3. There's no 3rd argument in onPlayerChat's function. Corrected code: local MONEY_AMOUNT = 5000; local WORDS_BLOCK = { ["fuck"] = true, ["bitch"] = true, ["sex"] = true, ["gay"] = true, ["ass"] = true, ["dick"] = true, ["shutup"] = true; } addEventHandler( "onPlayerChat", root, function( szMSG, szTYPE ) for str in pairs( WORDS_BLOCK ) do if ( string.find( szMSG, str ) or string.find( szMSG, string.upper( str ) ) ) then cancelEvent(); outputChatBox( getPlayerName( source ) .. " lost $5000 for insulting/writing a forbidden word!", root, 0, 255, 255, true ); takePlayerMoney( source, MONEY_AMOUNT ); break; end end end ) Wasn't tested but should work.
-
Uma coisa que você esqueceu de dizer foi para adicionar esses parametros "quitType" e "reason" à função do evento.
-
This isn't a resources request room.
-
addEventHandler( "onMarkerHit", topdeck, function( player ) local nR, nG, nB, nA = getTeamColor( getTeamFromName( "LS" ) ) if ( nR and nG and nB and nA ) then setMarkerColor( source, nR, nG, nB, nA ); end end )
-
That doesn't make sense. No one is wasting your time because no one even answered you. You're the only one wasting your own time lol
-
There are no enough developers, I guess that's the problem. And no, it ain't that easy as changing the game to add GUIs ( lol! ) and custom servers. Each game has been developed in a different way, with different engines.
-
guiSetPosition is for GUI elements, not for DirectX drawings. For such usage, create variables with the position values and update them when you need to move the DirectX draw ( it will work since the text, image or whatever you're drawing is updated every frame ). Bit out of topic but: Anderl I said I'm not sure, and that was reason why i wasn't sure. I have read that, and I told you that it really wasn't correct.
-
You mean keep adding numbers to what is already on the label? guiSetText( troll, guiGetText( troll ) .. tostring( math.random( 90 ) ) );
-
guiSetPosition is for GUI elements, not for DirectX drawings. For such usage, create variables with the position values and update them when you need to move the DirectX draw ( it will work since the text, image or whatever you're drawing is updated every frame ).
-
It's because you CAN'T write words like fuc*, sh*t and others here.
-
Then learn: http://lua.org
