Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. KariiiM

    Gate Script

    I just answered him that he defined the team name in a variable named 'teamName' and he didn't use it at all
  2. KariiiM

    Gate Script

    The variable 'teamName' is being useless
  3. KariiiM

    Gate Script

    The variable 'teamName' is being useless
  4. Deepu, you're totally wrong, "(getPed/setPed)ControlState works only with the peds not with local player since it's client sided
  5. Deepu, you're totally wrong, "(getPed/setPed)ControlState works only with the peds not with local player since it's client sided
  6. KariiiM

    Gate Script

    Can't you search by yourself first ? https://community.multitheftauto.com/
  7. Why you looping players and you don't use the values at all @Jaber, you want the gui to be showen on the player join the server?
  8. KariiiM

    speaker

    lol I tought I had added the 'not' before the function, thanks for your attention ! updated the deleteSpeaker function function deleteSpeaker(thePlayer) if not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then outputChatBox("You're not admin",thePlayer,255,0,0) return end if (isElement(speakerObject)) then destroyElement(speakerObject) outputChatBox("You have Succesfully destroyed the Speaker!", thePlayer, 0, 0, 255) triggerClientEvent("stopTheSound", root) else outputChatBox("Speaker is not created!", thePlayer, 250, 0, 0) end end addCommandHandler("destroyspeaker", deleteSpeaker)
  9. KariiiM

    speaker

    function createSpeaker(thePlayer) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then outputChatBox("You're not admin",thePlayer,255,0,0) return end local x, y, z = getElementPosition(thePlayer) speakerObject = createObject(2229, x, y, z-1) outputChatBox("You have Succesfully created a speaker!", thePlayer, 0, 250, 0) if (isPedInVehicle(thePlayer)) then local vehicle = getPedOccupiedVehicle(thePlayer) attachElements(speakerObject, vehicle) triggerClientEvent(root, "playTheSound", root, x, y, z, vehicle) else triggerClientEvent(root, "playTheSound", root, x, y, z) end end addCommandHandler("placespeaker", createSpeaker) function deleteSpeaker(thePlayer) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then outputChatBox("You're not admin",thePlayer,255,0,0) return end if (isElement(speakerObject)) then destroyElement(speakerObject) outputChatBox("You have Succesfully destroyed the Speaker!", thePlayer, 0, 0, 255) triggerClientEvent("stopTheSound", root) else outputChatBox("Speaker is not created!", thePlayer, 250, 0, 0) end end addCommandHandler("destroyspeaker", deleteSpeaker)
  10. KariiiM

    cancel bind

    I didn't test it, can you debug the code?
  11. KariiiM

    cancel bind

    Try this @Root: addEventHandler ( "onClientKey", getRootElement(), function (button, press) if (button == "w") then setElementData (getLocalPlayer(), "w", press) else return false end if (button == "space" and press) then if (getElementData (getLocalPlayer(), "w")) then cancelEvent() --cancel the event end end end)
  12. KariiiM

    cancel bind

    Yeah man I know that, but I can't even think I am too sleepy..
  13. KariiiM

    cancel bind

    client side: bindKey( "w", "down", function () if (getKeyState("space") == true) then cancelEvent () end end)
  14. KariiiM

    cancel bind

    Try this, addEventHandler("onClientKey", root, function ( key, press ) if (key == "w") then if (getKeyState("space")) then cancelEvent() end end end)
  15. KariiiM

    cancel bind

    unbindKey As far as I know, cancelEvent is used for events not for functions and "bindKey" is a function not an event
  16. local q = dbQuery(con, "SELECT * FROM t_ayuntamiento WHERE Cuenta=?",Cuenta) local result = dbPoll(q,-1) local data = result[1] --Define result[1] with data instead of repeating it everytime needed. outputChatBox (data.Cocodrilo.. "is into db")
  17. Oboviously dbPoll is a table, you have to loop it to get the specify value
  18. You have to pay the scripter
  19. Or, try my code: local model = nil function removingModels() if not model == 10324 or model == 10329 or model == 10330 or model == 10331 or model == 10332 or model == 10715 or model == 10719 then for i=550,20000 do model = i removeWorldModel(i,10000,0,0,0) end end end removingModels() setOcclusionsEnabled(false) Note: I didn't see your last post @CodyL
  20. Codly's way is good but be sure the variable 'worldmodel' must be defined else the code won't work These objects are models so you have to define worldmodel with the function: getElementModel But, be sure this function require one argument
  21. You can not update the table if its empty
  22. I will be glad to help, Btw, What do you mean by 'blood'? to make the player's health down when the timer become less than or equal to 0 ?
  23. Your current code is messy and not clear enough, if you want tomorrow I can make this code working for you, now I have to sleep
×
×
  • Create New...