Jump to content

Charlie_Jefferson

Members
  • Posts

    242
  • Joined

  • Last visited

Everything posted by Charlie_Jefferson

  1. 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. )
  2. 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.
  3. 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.
  4. onPlayerDamage. https://wiki.multitheftauto.com/wiki/OnPlayerDamage
  5. Wrong. You mixed them up. getPlayerIP is server-side ONLY. GUI is client-side ONLY. + the getPlayerIP function your wrote there has invalid arguments.
  6. 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())
  7. 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
  8. Eh. Means you gotta debug it yourself. If you don't get any error, than it sucks . Have fun, I guess.
  9. 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
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. C:\Program Files\MTA San Andreas 1.1\server\deathmatch\mods\internal.db
  18. OMG I TOTALLY FOUND THE PROBLEM! You didn't give us a script, that's the problem.
  19. 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").
  20. Maybe it doesn't work because you wrote the function's names, before function?
  21. 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.
×
×
  • Create New...