Jump to content

manve1

Retired Staff
  • Posts

    1,283
  • Joined

  • Last visited

Everything posted by manve1

  1. manve1

    help

    IPLs are map files for GTA:SA. Oh, didn't know that, thanx
  2. Actually it does, because u created the same function name and an event As midas said, functions aren't events. Functions must have different names because overwriting - unlike some languages that can differ functions by its parameters, any previous function declared with same name as the function being declared is overwritten. Events aren't the same as functions. Functions are something from Lua language itself, event names are just a string to name events - event system is from MTA:SA, it's not something from Lua itself. Hope you got it. I meant something like this, but im terrible at english language as its not my national language
  3. Actually it does, because u created the same function name and an event
  4. It isn't ... never call same function as an event. I mean the server script, i can't remember if i changed the client or not.
  5. Copy code again, i think i found the problem.
  6. CLIENT: addEventHandler("onClientResourceStart", resourceRoot, function() triggerServerEvent("bindClientKey", localPlayer ) end ) local chatActive = false addEventHandler( "onClientKey", root, function(key,pressed) setTimer( function() if pressed and key == "t" or "y" and chatActive == false then if isChatBoxInputActive() then chatActive = true elseif not isChatBoxInputActive() then chatActive = false local animBlock, animName = getPedAnimation(localPlayer) end return true end return false end, 50, 0 ) end ) SERVER: function realisticIC(keyPresser, key, keyState) if(keyState == "down") then setPedAnimation(keyPresser, "gangs", "prtial_gngtlkg", -1, true, false, true) elseif animBlock == "gangs" and animName == "prtial_gngtlkg" then setPedAnimation( source, false ) return true end end addEvent("bindClientKey", true) function bindClientKey_() if isKeyBound( source, "t" ) then unbindKey(source, "t", "down", realisticIC); bindKey(source, "t", "down", realisticIC) else bindKey(source, "t", "down", realisticIC) end end addEventHandler("bindClientKey", root, bindClientKey_) I think that this should work
  7. manve1

    help

    Thats cuz i think IPL isn't made for GTA:SA ( not sure ), P.S. This is scripting section not something to do with other stuff
  8. manve1

    How could i?

    i made it with a timer, still doesn't kill me function waterCheck(thePlayer) setTimer( function() if isElementInWater(thePlayer) then setElementHealth(source, 0) end end, 50, 0 ) end
  9. manve1

    How could i?

    I made this, but i didn't know what kinda event to use so i didn't use any, if you can, could u help me fix it? function waterCheck(thePlayer) if isElementInWater(thePlayer) then setElementHealth(source, 0) end end
  10. manve1

    How could i?

    How could i make a script like if the player hits water, he would be killed and re-spawned at certain position?
  11. It would be easier to create that when the person of team spawns, he gets the weapons.
  12. manve1

    Help

    NO no, u don't understand me, i already get player names on the grid list, when i click on their names, i want a label to get changed to their serial e.g. "Serial: blahblah ...."
  13. manve1

    Help

    Yeh, it worked, but i didn't want it on the grid, oh well, i fixed it, but when i click on someone else not me, it returns false
  14. manve1

    Help

    I made a script ( it might make no sense ) and i can't figure out that when i click on the grid and on my or my mates name, serial stay's the same, could you possibly fix it? addEventHandler( 'onClientGUIClick', aGrid, function() local pRow = guiGridListGetSelectedItem( aGrid ) if (pRow and pRow ~= -1) then guiSetText ( aSerial, "Serial: " .. getPlayerSerial( localPlayer, pRow, 1 ) ) end end )
  15. It is linked ... in the script u can see easily this line: exports.mapmanager:getRunningGamemodeMap() which has map manager in it
  16. That's good for the map buying thing, not for the rest
  17. Thats not true there are many people our there that want to help servers. Prove it. Btw, where did I miss a comma? You forgot tons of them. Anderl, there are few people out in the world scripting free ( like me, only just to learn quicker )
  18. https://wiki.multitheftauto.com/wiki/Scripting_Introduction Learn Basics ... https://wiki.multitheftauto.com/wiki/SetElementPosition Read the client side ...
  19. Do i put the coords where it says button? you put name of button where it say's "BUTTON" and replace "--code" to code you want it to be
  20. manve1

    Doesn't Ban

    so how could i make it work?
  21. manve1

    Doesn't Ban

    I'm currently want to make a ban function so an admin could ban a player using a button, but the problem is it doesn't work, i get no error or anything like that. CLIENT: addEvent('retriveBan', true) addEventHandler('onClientGUIClick', aBanOk, function(theClient) addEventHandler('retriveBan', getRootElement(), function() getBanSerial = getPlayerSerial( localPlayer ) triggerServerEvent( 'banThePlayer', localPlayer ) end ) SERVER: addEvent('banThePlayer', true) addEventHandler('banThePlayer', getRootElement(), function() addBan( nil, nil, getBanSerial, source, reasonBan ) triggerClientEvent('retriveBan', source ) end ) NOTE: I'm making this so i could turn off the orginal MTA admin panel
  22. manve1

    Need help!!

    I think this should work: function testing() if getPlayerTeam( getTeamFromName( 'Medic' ) then guiSetVisible( window, true ) else guiSetVisible( window, false ) --Note: you need to change few pieces like in the "GuiSetVisible" the window
  23. Another way is in the new admin panel there is a function already made to set the FPS higher.
  24. It would work, lots of Race DM servers scripted this, so yeh ... you can
×
×
  • Create New...