-
Posts
297 -
Joined
-
Last visited
Everything posted by Bonus
-
Oh, didint see the video. The easiest way is to save the neon in an array with vehicle as index and use it in detachNeon. neonarray[vehicle] = { neon1, neon2 ... } And something I never tested: You can use setElementParent. Let the vehicle become the parent of the neonlights. If the vehicle gets destroyed the neonlights will get destroyed too.
-
And why did you post this code now?! Did you try the code I sent to you?
-
Why use clientside?! local playerInVehicle = {} local vehicleGotPlayer = {} local function detachNeon ( theVehicle ) local attachedElements = getAttachedElements ( theVehicle ) for i,v in pairs ( attachedElements ) do --detachElements ( v, theVehicle ) is this even needed? If yes then activate it destroyElement ( v ) end end local function removeNeonOnEvent ( vehicle ) local vehicle = vehicle or getElementType ( source ) == "vehicle" and source or playerInVehicle[source] local player = getElementType ( source ) == "player" and source or vehicleGotPlayer[vehicle] detachNeon ( vehicle ) playerInVehicle[player] = nil vehicleGotPlayer[vehicle] = nil setElementData ( player, "neon", 0 ) removeEventHandler ( "onPlayerQuit", player, removeNeonOnEvent ) removeEventHandler ( "onPlayerVehicleExit", player, removeNeonOnEvent ) removeEventHandler ( "onVehicleExplode", vehicle, removeNeonOnEvent ) end ) addEventHandler ( "onVehicleEnter", root, function ( player, seat ) if seat == 0 then playerInVehicle[player] = source vehicleGotPlayer[source] = player addEventHandler ( "onPlayerQuit", player, removeNeonOnEvent ) addEventHandler ( "onPlayerVehicleExit", player, removeNeonOnEvent ) addEventHandler ( "onVehicleExplode", source, removeNeonOnEvent ) end end )
-
Show the triggerClientEvent function with "VapidStock". I think it doesnt even trigger correctly. Or you can put an outputDebugString ( tostring ( Vapid ) ) in showVapidCount (first line). Then the debugscript should tell us more.
-
Here's the exact same problem: https://bugs.multitheftauto.com/view.php?id=8966 Try to use setTimer to give the weapon. function cmdArmedPed( command ) local x, y, z = getElementPosition(localPlayer) -- Get your position local thePed = createPed(0, x + 1, y, z) -- Create a CJ ped nearby setTimer ( function ( ped ) givePedWeapon( ped, 31, 5000, true) -- Give him 5000 rounds of M4 setControlState( ped, "fire", true) -- Make him shoot continuously end, 100, 1, thePed ) end addCommandHandler("armedped", cmdArmedPed)
-
Suche gutes RL Script Biete Minecraft account
Bonus replied to ASAPMarcel's topic in German / Deutsch
Ich habe da ein stark bearbeitetes Vio Script namens Ultimate, falls du noch suchst. Ist aber Vio. -
Use setPedControlState instead https://wiki.multitheftauto.com/wiki/SetPedControlState
-
Is it serversided or clientsided? Did you even put the file in meta.xml? Sure you got no other function with the same name? Then it has to work.
-
Oh it should be easy. addEventHandler ( "onPlayerChat", root, function ( msg, typ ) if typ == 0 then local time = getRealTime() local timestring = "[".. time.hour ..":".. time.minute ..":".. time.second .."]" local text = getPlayerName ( source ) .. ": "..msg triggerClientEvent ( "updateChatInGUI", source, timestring, text ) end end Then use it clientsided with guiGridListAddRow and guiGridListSetItemText. For JOIN and QUIT you can use onPlayerJoin and onPlayerQuit. But I don't know what (LV) and (SF) is, if its the Zone you can get it with getZoneName.
-
Its not the same ... There is an "end" too much and a ")" is missing at the end. It won't even work But I had the same issue and could never fix it. Still don't know why I had this problem.
-
You can't use "findPlayer(findPlayer)". Its not a function, it's a player (or nil).
-
I'm using dbConnect, dbPoll, dbExec, dbQuery ... https://wiki.multitheftauto.com/wiki/DbConnect https://wiki.multitheftauto.com/wiki/DbPoll https://wiki.multitheftauto.com/wiki/DbExec https://wiki.multitheftauto.com/wiki/DbQuery
-
Sry, but I still dont understand anything. Can you perhaps show us an example?
-
I can't understand anything ...
-
I once had the same problem, never found out why. There was no message, just black. Did you fix it?
-
Read that: https://forum.multitheftauto.com/viewtopic.php?f=114&t=36424
-
Show us how you are using poll. Although you could open your database and look if it saved.
-
What do you even want? I didn't understand exactly what you want. If you mean the turkish words like s for sh, c for ch and i without the point then try to use the normal words.
-
setWeather is changing it too fast + every 20 sec. Its only a test-code, better use 2 hours and setWeatherBlend.
-
Just use name_skin in triggerServerEvent, put skin in the function joinHandler_... and get the skin-ID. In your code the player can choose "CJ". But "CJ" is not a model-ID, so you have to use the model-ID instead.
-
You should really work with debugscript. There is a ")" missing for setWeather. function changeWeatherRandom ( ) setWeather ( math.random ( 0, 255 ) ) end setTimer ( changeWeatherRandom, 20*1000, 0 )
-
Clientsided: If a player, whoever he is, joins to your server and changes his nick, then he gets a clientsided file, where the other clientsided files are getting downloaded. There he can see ONLY his own nickchanges. Serversided: The folder where you place your serversided files and got your meta.xml. There is a folder with the name logs. If a player on your server, doesn't matter who he is, does a nickchange, then there will be a file with the name logs.log in the folder logs. There is every nickchange on the server listed. But the player, who doesnt have access to the serversided files, can't see this logs.log, because its serversided, not clientsided.
-
Clientsided: Only the player can see his own nickchanges Serversided: Only the players who can look in the serversided files can see every nickchange
-
Are you trolling? Dont change your serversided files! Look: If you are a player, who has NO ACCESS TO THE SCRIPT, then you can still get the logs. Cause they are clientsided, not serversided! They are there where your clientsided files are saved. If I join my server then the file is here: C:\Program Files (x86)\MTA San Andreas 1.4\mods\deathmatch\resources\TDS\logs\logs.log Don't change serversided things, its not where your server is!