Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. KariiiM

    help

    Your code is totally messy I won't edit the whole code for you, I will just guide you to do that then post what you have done with so far. Use those two functions: getPedWeapon -- To get player weapon. getPedTotalAmmo -- To get the total ammo of a specified weapon. Change the index loop to 0, 12: for example: for i= 0, 12 do -- your code end I recommand you to use an empty table using the weapon as an index and insert into it the ammo. and use: toJSON -- store the data fromJSON -- load the data
  2. I can confirm that, there is really no limit on the size of JSON data to be send or receive, it's up to the capabilities of the function that you are using.
  3. Be sure your file is declared as server side in your meta.xml
  4. Try this: addEventHandler ( "onPlayerWasted", root, function ( ) local theVeh = getPedOccupiedVehicle ( source ) if ( theVeh ) then if ( isVehicleBlown ( theVeh ) ) then local creator = getPlayerName ( source ) local x, y, z = getElementPosition ( source ) createObject ( 1212, x, y, z + 0.5 ) triggerClientEvent ( "play", source ) end end end )
  5. Ask the owner of the gamemode, if did he use ALTER to add / modify a new column to the database.
  6. If there's a missed column in the database the code will be failed to load.
  7. You're welcome, just to tell you that, the client files will be restarted each time the local player joined the server
  8. Now I got what you mean: Use the function fileExists to check if the file is already exists or not then do your code, Tomas already posted the function for you, Try something like that: if ( fileExists ( "filePath" ) then -- the file exists else -- doesn't exist end
  9. I wrote a code for you, untested but it should work: client side: addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) triggerServerEvent ( "onClientReady", localPlayer ) end ) addEvent ( "showDX", true ) addEventHandler ( "showDX", root, function ( ) -- your code end ) server side: local players = { } addEvent ( "onClientReady", true ) addEventHandler ( "onClientReady", root, function ( ) if ( not players[client] ) then players[client] = true else triggerClientEvent ( client, "showDX", client ) end end ) addEventHandler ( "onPlayerQuit", root, function( ) if ( players[source] ) then players[source] = nil end end ) Wish that can help you
  10. او if ( getElementDimension ( element ) ~= 1 ) then return end
  11. Check your debug errors while you trying to start the resource, and out put them here.
  12. I see none tried to help you, because obviously, your problem is not clear enough. Upload a screenshot as an explanation to show us what you're trying to do exactly.
  13. Put this code in server side; addEvent ( "silahver", true ) addEventHandler ( "silahver", root, function ( ) setElementPosition ( client, 442, -1312, 15.5 ) giveWeapon ( client, 31, 200 ,true ) end ) go to client side and modify the Soygun function by this function: function Soygun ( ) triggerServerEvent ( "silahver", localPlayer ) end
  14. giveWeapon does, but it's server sided
  15. Your main mistake is you used the function givePedWeapon to the localPlayer while this function works only for peds.
  16. This code make no sense in my head, can you explain your problem well?
  17. KariiiM

    help

    It's not a propper way to ask for help, you didn't explain anything about your problem, what's the role of this code? Is it a saving weapons on the account data ?
  18. That's mean the 42.dff file is failed to load before the trigger of the event onClientFileDownloadComplete
  19. KariiiM

    [HELP] Timer

    Show the full code, this part seems fine except if you didn't define some variables the code will fail to load.
  20. Use this event to check the downloaded files. onClientFileDownloadComplete
×
×
  • Create New...