Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. Probably negligible difference. I'm not sure here, but I've already tried making a CEF interface, it worked just fine.
  2. If you're creating the teams with the admin panel, then you'll need a different way to save the teams, like SQL. If you're creating the teams with the functions, then simply starting the resource will create the teams.
  3. onPlayerQuit -> get the position, save it per account and load it when the player logs in. addEventHandler('onPlayerQuit', root, function() local x,y,z = getElementPosition(source) local pos = table.concat({x, y, z}, ',') --insert it end) Then to load it again: local x, y, z = unpack(split(pos, ','))
  4. startedResource is not defined in the handler. You need to add it as a parameter. addEventHandler("onResourceStart", getRootElement(), function(startedResource)
  5. The server-side code is executed as soon as the resource is started, the client-side is executed when the files are downloaded. So, yes, onResourceStart can be called while the client is still downloading.
  6. There are ways to check, but, I'm asking again, why? What are you trying to achieve here? You should just not alter tables in scripts, the table's schema should be static throughout.
  7. For MTA's web server: https://wiki.multitheftauto.com/wiki/Re ... Web_Access For CEF: https://wiki.multitheftauto.com/wiki/CE ... munication
  8. What are you trying to achieve here? Altering a table should only occur once, I don't see the point of checking each time. The first line does not check if the column exists or not. It checks if results were returned (even if empty) or not.
  9. JR10

    Aiming

    Had a syntax error. addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end) You check use /debugscript 3 to check for errors yourself.
  10. JR10

    Aiming

    addEventHandler('onClientPlayerWeaponFire', localPlayer, function() if (not getControlState('aim_weapon')) then cancelEvent() end end)
  11. onClientPlayerWeaponFire Use getTickCount to store the tick count on fire. Next on fire, check if a certain amount of time has passed using getTickCount() - startTick
  12. Yes. Make sure you actually want a default value, as in, when you insert a row without a value, it will be automatically set to the default value.
  13. The default value? Append "DEFAULT 'VALUE'" to your column definition.
  14. JR10

    Killed by

    It looks fine, are you sure that a player killed you? Try debugging with outputDebugString to output the killer variable.
  15. JR10

    [WIP] LIFE

    I remember a resource that used a similar approach for cross-server chatting, needless to say, no decent server used it. Personally, I would never trust this. The code will be reviewed by MTA Team before it's uploaded to MTA Community. Did you ask someone to review it? Resources that are uploaded to the community do not get reviewed automatically.
  16. JR10

    gang system

    Depends on how you're saving players' data. If you're using the default account system, then loop through all the accounts and check for account data. If MySQL, use a query to get the accounts with the gang == your gang.
  17. Check for permissions. The script might not be readable.
  18. onPlayerDamage can not be cancelled. Use onClientPlayerDamage
  19. The second error is output because call fails to execute your exported function, either the resource is not started or the function is not exported. Make sure that the function is exported server-side.
  20. The tag is used for MTA's web interface. It uses a pre-processor to parse Lua code. The browser has no idea what the line means and will not parse it. Use https://wiki.multitheftauto.com/wiki/CE ... ipt_to_Lua
  21. You did not use my code at all.
  22. What does it have to do with admin? Do you expect anyone to sift through 1,000 lines of code looking for problems?
  23. JR10

    Flag changer

    You always have to specify which files to load in the meta.xml file. The code I posted is server-side.
  24. The router is not the problem as I too have this problem. I tried v1.4, it didn't work as well. Me and rockleg have the same ISP, could the problem be at their end?
×
×
  • Create New...