Charlie_Jefferson
Members-
Posts
242 -
Joined
-
Last visited
Everything posted by Charlie_Jefferson
-
Shhh. I got a secret for him, if he gives 5 dolla'. (I will just make the radar color, because that's pretty much the turf script. )
-
function wantedLevel( thePlayer ) pname = getPlayerName(thePlayer) wanted = getPlayerWantedLevel(thePlayer) wantedStars = { 1, 2, 3, 4, 5 } if wanted == wantedStars then setPlayerName(thePlayer, pname .. "[" .. wanted .. "]") else return end end Not sure if it works.
-
The player doesn't get damaged when crashing with vehicle. He didn't mention the vehicle here, so I thought he wanted the script different, instead.
-
onPlayerDamage. https://wiki.multitheftauto.com/wiki/OnPlayerDamage
-
Wrong. You mixed them up. getPlayerIP is server-side ONLY. GUI is client-side ONLY. + the getPlayerIP function your wrote there has invalid arguments.
-
Server: function ip( thePlayer ) --get player IP goes here end addEvent("ip") addEventHandler("ip", root, ip) Client: -- your client code goes here triggerServerEvent("ip", getLocalPlayer())
-
function displayText () local screenHeight, screenWidth = guiGetScreenSize() wantedLvl = getPlayerWantedLevel() if wantedLvl == 0 then dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) else dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) end end addEventHandler ( "onClientRender", root, displayText ) addCommandHandler ( "wanted", displayText ) Probably won't work, but try it
-
Eh. Means you gotta debug it yourself. If you don't get any error, than it sucks . Have fun, I guess.
-
function createText () addEventHandler ( "onClientRender", root, DrawText ) end addCommandHandler ( "wanted", createText ) function DrawText () local screenHeight, screenWidth = guiGetScreenSize() wantedLvl = getPlayerWantedLevel() if wantedLvl == 0 then dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) else dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) end end
-
i have script, it no work, help pls, me no no whi, Plz help, i lern lua son Promise men Help plz. u don wan hhelp me i wait snake YES! WE ARE EVIL WE NEVER HELP PEOPLE, MWAHAHAHAHA. If you want help, give us the debug error.. /debugscript 3 and start your script.
-
Command with one variable that uses spaces
Charlie_Jefferson replied to mikeee324's topic in Scripting
why? just use the code.. if it doesnt work post here I'm dumb because it was simple and I didn't figure it out. -
Run a function in another lua file but within same resource?
Charlie_Jefferson replied to UserAccount3's topic in Scripting
I suggest making a client and a server lua. If you do that, you can just addEvent in any of them and do triggerServerEvent or triggerClientEvent. -
Command with one variable that uses spaces
Charlie_Jefferson replied to mikeee324's topic in Scripting
I'm dumb . -
Command with one variable that uses spaces
Charlie_Jefferson replied to mikeee324's topic in Scripting
Having the same problem. Got this code: function vehicle(thePlayer, cmd, carname) local x, y, z = getElementPosition ( thePlayer ) local id = getVehicleModelFromName ( carname ) spawnVehicle( id, x+3, y+3, z ) end addCommandHandler("spawnveh", vehicle) function checkArg( ... ) local argumentNumber = #arg local parameters = table.concat( arg, " " ) end And from that, I'm stuck. No idea how to make it check every time I do my /spawnveh. -
If you pay me, I'm in. I request 20000$ please. Now seriously either learn lua, cause' there will be no scripters on the MTA forums that will join. No pro scripters at least.
-
He is probably. I've fixed that "bug" he's talking about. Some guy setVehicleDoorState to 4 and the lowest HP possible when the car respawns, before releasing the script. Pretty easy to fix.
-
Give me the script then?
-
Already answered. Btw you can use getAccounts To get a table with all the accounts of your server. I know, was just saying. If any other people need the directory, then they will find it here.
-
C:\Program Files\MTA San Andreas 1.1\server\deathmatch\mods\internal.db
-
OMG I TOTALLY FOUND THE PROBLEM! You didn't give us a script, that's the problem.
-
Also, to make them respawn, you gotta get the position of them and setVehicleRespawnPosition(https://wiki.multitheftauto.com/wiki/Set ... wnPosition) and then when they explode, respawnVehicle(https://wiki.multitheftauto.com/wiki/RespawnVehicle) and add an eventHandler for it("onVehicleExplode").
-
Maybe it doesn't work because you wrote the function's names, before function?
-
What errors do you get?
-
function repair ( thePlayer ) playerVehicle = getPedOccupiedVehicle ( thePlayer ) if (playerVehicle) then fixVehicle ( playerVehicle ) else end end addCommandHandler ( "repair", repair ) function nos ( thePlayer ) if (playervehicle) then addVehicleUpgrade ( playerVehicle, 1010 ) else end end addCommandHandler ( "nos", nos ) function bindKeys ( thePlayer, commandName ) bindKey ( thePlayer, "2", "down", repair ) bindKey ( thePlayer, "mouse1", "down", nos ) end addEventHandler ( "onPlayerLogin", getRootElement(), bindKeys ) The meta.xml should be as server-side, not client-side. Report back, tell me if it worked.