-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Why the f* is it too hard to do this? local players = getElementsByType("player") for playerKey, playerValue in pairs(players) do if getElementHealth(playerValue)>0 then setElementModel (getPedOccupiedVehicle(playerValue), vehicles[math.random(#vehicles)]) end end The rest is yours.
-
for the people that don't understand what this bug is: Watch the ammunition in the right corner. You see that the ammo from the desert eagle get reset to 10. Normally this slot would be filled up to 60.
-
Well I created a system for that. I recommend you to search for client 'events' that got triggered before the vehicles got damaged. Like: onClientPlayerWeaponFire
-
no, "stopping the fire" https://wiki.multitheftauto.com/wiki/OnClientWeaponFire
-
He is requesting, he is only interested in the whole code. (he don't know anything about lua) Waste of your time....
-
speed = getVehicleHandling ( theVehicle )["maxVelocity"] RPM??????
-
I did start writing it before you post anything.
-
I was already writing this,,,, so I post it any way. local guiTable = { ["lobby"]= guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "images/lobbyBG.png", true), ["arenas"]= guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "images/arenas.png", true), ["dm"]= guiCreateStaticImage(0.157, 0.19, 0.17, 0.305, "images/areny/dm.png", true, arenas), ["dd"]= guiCreateStaticImage(0.331, 0.19, 0.17, 0.305, "images/areny/dm.png", true, arenas) } guiSetAlpha ( guiTable["dm"], 0.75 ) guiSetAlpha ( guiTable["dd"], 0.75 ) addEventHandler( "onClientMouseEnter", root, function(aX, aY) for key,gui in pairs (guiTable) do if gui == source then guiSetAlpha ( source, 1 ) return end end end )
-
I was nice in the beginning, But it looks like, you aren't willing to learn it on your self. In fact you don't even try to learn anything. The only thing you care about is having it as you want and skipping the learning part. That isn't going to work. I just did post the basic pages, really nice samples and easy to understand. You should start there and don't act like a kid that isn't old enough to learn. DO I MAKE MY SELF CLEAR? GOOD LUCK! and of course you can ask me anything that has related to scripting, as long it is a specific lua question and not about pathetic resources.
-
Then you should not asking here on the scripting section. --> viewforum.php?f=108 shadow's are something from mta san, you can put them on and off in the main menu. Not sure if you can remove them with shaders.
-
He must have because else it would start giving an error instead of a warning. ERROR: attempt to index a nil value. (title: Re: table index is nil) As far I know it is the same. runningStreaks[player].x runningStreaks[player]["x"] But I prefer ["x"]. When I use table.x, I always get confused that x is a not defined value.
-
function triggerSwarm( player ) if not runningStreaks[player] then runningStreaks[player] = {} -- make it a table end runningStreaks[player]["name"] = getPlayerFromName (player ) -- insert name runningStreaks[player].x, runningStreaks[player].y, runningStreaks[player].z = getElementPosition ( runningStreaks[player] ) -- insert pos end
-
It depends what you want to make. Be more specific. You mean something like this? addEvent("myEvent",true) addEventHandler("myEvent",root, function (x,y,z) if isElement(source) then -- make sure the player does still exist before the data reached the server. setElementPosition (source,x,y,z) end end)
-
@Minotaur I did warn you about me reporting spam/begging topic's. https://forum.multitheftauto.com/viewtopic.php?f=91&t=60987 This one should be locked.
-
Can't you read? other mistake script is starting? /debugscript 3 else show your meta.
-
well as far I can see it have to work. You sure the sound is there?(and in the sound/ folder) I only see one other mistake(it is client not serverside): function lobby(player) Must be: function lobby(command) -- string commandName, [string arg1, string arg2, ...]
-
@John. doesn't take any argument which would tell it who can see the nametag and who can not. SetPlayerNametagShowing at client side isn't synced and that is a good thing, so it is possible but only at client side.
-
try this: (explosion will be created at the marker) SERVER local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(element,d) if d then local x,y,z = getElementPosition(source) -- source = marker createExplosion(x, y, z, 0) end end addEventHandler( "onMarkerHit", myMarker, fakeBomb ) OR client -- for client side: "onClientMarkerHit" local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(element,d) if d then local x,y,z = getElementPosition(source) -- source = marker createExplosion(x, y, z, 0, true, -1.0, false) end end addEventHandler( "onClientMarkerHit", myMarker, fakeBomb )
-
You haven't wrote down a single line of code. So no, I won't make it for you. nobody will, unless you pay them. If you are going to beg players, to make it for you. I simply report the topic for closing.
-
and i put it this to fr_client so:* yes, but replaced it with the old functions. (else it probably going to be bugged) Minotaur, first learn the basic. You can say at every topic that you are a "noob scripter", but that isn't help you to learn it. You will always having the same problems and for 60% they are able to help you. But most of the time big resources get bugged after adding stuff. Simply because you change the system. You can start with some basic stuff, most of that you can find here: Client Scripting: https://wiki.multitheftauto.com/wiki/Cl ... _Functions https://wiki.multitheftauto.com/wiki/Cl ... ing_Events Server scripting: https://wiki.multitheftauto.com/wiki/Se ... _Functions https://wiki.multitheftauto.com/wiki/Se ... ing_Events
-
math.random(1,255) ................................... tocolor (math.random(1,255),math.random(1,255),math.random(1,255))
-
maybe because you created something that isn't at the right place. and it is missing an "end" function warpTo(leaf) if not leaf then leaf = getSelectedGridListLeaf(wndWarp, 'playerlist') if not leaf then return end end local player = getPlayerFromNick(leaf.name) if player then if getElementData(player,"warp.status") then outputChatBox ( "This player has disabled warping.", player, 255, 0, 0 ) return end -- added server.warpMe(player) end closeWindow(wndWarp) end function warpToCommand(cmd, player) if player then player = getPlayerFromNick(player) if player then if getElementData(player,"warp.status") then outputChatBox ( "This player has disabled warping.", player, 255, 0, 0 ) return end --added server.warpMe(player) end else createWindow(wndWarp) showCursor(true) end end addCommandHandler('warpto', warpToCommand) addCommandHandler('wt', warpToCommand)
-
or when you wrote it a lot of times on your script. (like 10 times etc.) Also possible, but not recommended. hiddenSpawn = {[0]=1093, -358, 74, 0}
