Jump to content

Spakye

Members
  • Posts

    104
  • Joined

  • Last visited

  • Days Won

    2

Spakye last won the day on December 4 2023

Spakye had the most liked content!

2 Followers

Details

  • Gang
    [UVA]

Recent Profile Visitors

1,996 profile views

Spakye's Achievements

Punk-@ss B*tch

Punk-@ss B*tch (12/54)

32

Reputation

  1. Hello, you can encrypt your script so people cant read it. You can't avoid people downloading client side script since it runs on their pc. As far as i know its the only solution but i could be wrong
  2. Hello with setElementDimension()
  3. Hello, could it be that the car explosion count as a player killing himself (suicide)? so then it print the suicide message and then the other one? maybe change the suicide message so they are not identical.
  4. Hello, you need to use toJSON to turn the table into a string to be able to save it, and then use fromJSON to turn it back into a table when you need to use it.
  5. Hello, I will try to give you some step by step indications on how you can do it rather than give you ready to use code. Client side, try to create a windows with guiCreateWindow() Try to make it appear and disappear with guiSetVisible(), you did not specify how and when you want the window to appear so i can only recommend trying with a commandHandler for now. You can easily replace it later on. Try to add a button to the window with guiCreateButton() and to attach it to a function with addEventHandler("onClientGUIClick", yourButton, youFunction) Try to make an easy function that output some text at first with outputChatBox() At that point you should be able to show the window, close the window, and print a message by clicking the button. Server Side, make a simple function that print some text like "server received the trigger", create an event with addEvent(), and add an event handler that calls the function you just made when the event is triggered. Back to client side try to add a server event trigger with triggerServerEvent() that will trigger the event you just created. If it works and you see your message sent from server side you have done the hardest part. Now you will do the same thing but in the other way. Create an event client side, trigger it from the server with triggerClientEvent(), make a function that shows your picture with guiCreateStaticImage(), hide the picture with setTimer() Thats pretty much it, its not very well explained and detailed but i can help you out if you struggle with something specific later on. Please just give it a try
  6. Damn i struggle to believe this is actually mta sa Really good job it looks very nice! I hope your project works out well and im looking forward to try it!
  7. giveWeapon(player23,...) instead of Player23
  8. Hello, you wrote Player23 instead of player23
  9. Hello, check IIYAMA resources https://community.multitheftauto.com/index.php?p=profile&id=285621 Project trains and Airplane. This resources add airplanes and trains going arround the map. Its not exactly what you want but it does bring some life to the gta map.
  10. hello can you share the code you have so far?
  11. Hello, use fadeCamera and spawnPlayer when a player joins. function spawnThePlayer() fadeCamera ( source, true) spawnPlayer ( source, 0, 0, 5) end addEventHandler ( "onPlayerJoin", root, spawnThePlayer )
  12. Cause the vehicle damage event parameters are different addEventHandler("onClientVehicleDamage", root, function(theAttacker, dmgType, loss,) if (dmgType == 19) then cancelEvent() local currentHealth = getElementHealth(source) setElementHealth(source, currentHealth - loss*2) -- doubling the damage end end )
  13. local rocketDmg = 50 function changeRocketDmg(attacker, dmgType, bodypart, loss) if (dmgType == 39) then cancelEvent() local playerHealth = getElementHealth ( localPlayer ) - rocketDmg if playerHealth <= 0 then killPed(localPlayer, attacker) else setElementHealth(localPlayer, playerHealth) end end end addEventHandler("onClientPlayerDamage", localPlayer, changeRocketDmg) Hello you can try this, i did this quickly on my phone so i didnt test it and there is maybe mistakes but the general idea should work i think. The problem with this method is that the rocket dmg is a set value when in reality you should take less dmg if you are far from the explosion or a lot of dmg if you stand right into it. You could do a percentage instead, you keep the first part of the code but then reduce loss value by 50% or something like that. local rocketDmgModifier = 0.5 -- from 0 to 1, 0 for 0% of the dmg and 1 for 100% of the dmg function changeRocketDmg(attacker, dmgType, bodypart, loss) if (dmgType == 39) then cancelEvent() local playerHealth = getElementHealth ( localPlayer ) - ( loss * rocketDmgModifier ) if playerHealth <= 0 then killPed(localPlayer, attacker) else setElementHealth(localPlayer, playerHealth) end end end addEventHandler("onClientPlayerDamage", localPlayer, changeRocketDmg) An other version with percentage rather than a set value. Again i didnt test it
  14. Do you use the default mta account system or do you have your own?
×
×
  • Create New...