Jump to content

fmj02

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by fmj02

  1. yes, for example I have command that sets animation to some dance I use /dance but it stops
  2. event is not a function, it works worse than before ;/ it means it still doesn't work
  3. you have just changed stopAnim function name to stopAnimFunction, it doesn't matter what's the function name ... in this case
  4. ... and what did you change there? It's same.
  5. it doesn't work...... same and you forgot about trigger
  6. I have script that stops anim when chat input is cancelled( I have talking animation when I press 't' ). It works, but the problem is it cancels animations executed by command for example /dance, /sit, I tried many ways to fix it one worked but I had to cancel input 2 times then animation was stopping... ;/ I don't know what should I do. Im angry, it's a little script and I have little problem hard to fix. Look at it please: CLIENT: addEventHandler("onClientResourceStart", resourceRoot, function() triggerServerEvent("bindClientKey", localPlayer ) end ) local chatActive = false local chatActiveTimer addEventHandler( "onClientKey", root, function(key,pressed) if pressed and key == "t" or "y" and chatActive == false then -- This timer checks if the chat input is active 50ms efter 't' has been pressed if isChatBoxInputActive() then chatActive = true -- Timer chat checks if the chat is still active every 250ms. The timer is destroyed when the chat becomes inactive. chatActiveTimer = setTimer( function() if not isChatBoxInputActive() then chatActive = false --local animBlock, animName = getPedAnimation(localPlayer) local animBlock, animName = getPedAnimation(localPlayer) triggerServerEvent( "stopAnim", localPlayer, animBlock, animName ) if chatActiveTimer then if isTimer(chatActiveTimer) then killTimer( chatActiveTimer ) end end end end, 250, 0 ) end return true end return false end ) SERVER: function stopAnim(animBlock, animName) if animBlock == "gangs" and animName == "prtial_gngtlkg" then setPedAnimation( source, false ) return true end end addEvent( "stopAnim", true ) addEventHandler( "stopAnim", root, stopAnim ) -- talking animation during IC chat function realisticIC(keyPresser, key, keyState) if(keyState == "down") then setPedAnimation(keyPresser, "gangs", "prtial_gngtlkg", -1, true, false, true) end end addEvent("bindClientKey", true) function bindClientKey() bindKey(source, "t", "down", realisticIC) end addEventHandler("bindClientKey", root, bindClientKey)
  7. replace mysql resource with old mysql resource and edit only connection.lua
  8. and gave you the hostname too im sure!
  9. ehhhhh, you should know your hostname, how you know your login and password to mysql then?
  10. in phpmyadmin go to More> Variables and seek for hostname( you must quit the database then you will see variables option0)
  11. no... find some ip -> login to phpmyadmin and you should see ip above
  12. all information you should find on vortexservers.com or in phpmyadmin 127.0.0.1(host) » my_db » some_table
  13. There where your MySQL server is located
  14. local hostname = "localhost" it's wrong, search for real hostname( you aren't using xampp right?)
  15. post here content of these scripts from mysql in [lua] tags
  16. find resource in server folder called "mysql" or "sql" ( i think fort carson have it0
  17. this in deathmatch/resorces is unnecessary
  18. yes but depends what type of mysql module fc is using/ the best solution is to put all these modules
  19. MTA San Andreas 1.3\server\mods\deathmatch\modules I think your mysql connection file isn't correctly configured.
  20. I will try to solve your problem on forums, tell me if you have modules folder created where server folder is located? put it into the mtaserver.conf: <module src="mta_mysql.dll" /> <module src="sha.dll" /> <module src="ml_sockets.dll" />
  21. What about debug errors? This server is on linux or windows? Make sure mysql is correctly configured.
  22. I have tested your resource, It didn't work, code was correct, I made folder "asdd" and created your meta and server: and it works check by yourself ;p have fun with scripting addEventHandler("onResourceStart", resourceRoot, function() if not exports.mysql:create_table('characters', { { name = 'characterID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'characterName', type = 'varchar(22)' }, }) then cancelEvent() return end end ) addCommandHandler("makethiskrapidiot", function(player, cmd) local result = exports.mysql:query_free("INSERT INTO characters (characterName) VALUES ('John Smith')") if result then outputChatBox("You have succesfully inserted new character", player, 0, 255, 0, false) else outputChatBox("FAIL", player, 255, 0, 0, false) end end )
  23. function Veh_Jump(key, keyState) if(keyState == "down") then local p_Vehicle = getPedOccupiedVehicle(localPlayer) if(points >= 50) then if p_Vehicle and isVehicleOnGround (p_Vehicle) then local px, py, pz = getElementVelocity (p_Vehicle) setElementVelocity (p_Vehicle, px, py, pz + 0.7) end else end end end bindKey("lshift", "down", Veh_Jump) addCommandHandler("vehjump", Veh_Jump) try now
×
×
  • Create New...