Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. If your faction system uses account data then you don't need to export just do: string getAccountData ( account theAccount, string key ) And if it uses SQL then you still don't need to export because you can executeSQLQuery from any resources.
  2. Try this: Player_Window = guiCreateWindow(22,226,189,359,"Players List by Sparrow",false) Player_Grid = guiCreateGridList(16,57,156,288,false,Player_Window) column = guiGridListAddColumn(Player_Grid,"Player",0.2) guiGridListSetSelectionMode(Player_Grid,2) Hide_Button = guiCreateButton(38,23,116,26,"",false,Player_Window) addCommandHandler("players", function () guiSetVisible(Player_Window, true) showCursor(true, false) end, false) addEventHandler("onClientGUIClick", Hide_Button, function (button) if (button == "left") then guiSetVisible(Player_Window, false) showCursor(false) end end, false) showCursor(true) function show() for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( Player_Grid ) guiGridListSetItemText ( Player_Grid, row, column, getPlayerName ( player ), false, false ) end end function Show() local player = guiGridListGetItemText (Player_Grid, guiGridListGetSelectedItem (Player_Grid), 1) end
  3. JR10

    Problems

    How the window variable is rules? and your parent for all the buttons and memo is GUIEditor_Window[1]?? Replace GUIEditor_Window[1] with rules. And, i don't see the event added, and you probably create the rule window each time the player press F2 create it on resource start, hide it, then show it when needed. Here: client side function CreateRule() GUIEditor_Button = {} rules = guiCreateWindow(194,108,426,400,"J World: Freeroam Service Window",false) --Buttons chg_pss = guiCreateButton(15,33,70,40,"change password",false,rules) chg_nick = guiCreateButton(95,35,70,40,"change nick",false,rules) lout = guiCreateButton(178,36,70,40,"Logout",false,rules) --Text read_only = guiCreateMemo(17,92,398,100," Welcome to J World: Freeroam\n\n There is no rules on this server.\n\n All we ask is to be respectful to others and have FUN.",false,rules) guiMemoSetReadOnly(read_only,true) guiCreateLabel(20,231,371,145,"COMING SOON!!!",false,rules) guiSetVisible(rules, false) end addEventHandler('onClientResourceStart', resourceRoot, function() CreateRule() end ) addEvent('server', true) addEventHandler('server', root, function() guiSetVisible(rules, not guiGetVisible(rules)) showCursor(not isCursorShowing()) end )
  4. https://community.multitheftauto.com/index.php?p= ... ls&id=1995
  5. JR10

    Wanted Level

    Then show me the timer and show me your respawn players script.
  6. Damn, client side: just remove those lines: bindKey("jump", "down", Superman.onJump) addCommandHandler("superman", Superman.cmdSuperman) and add at the end: addEvent('setSuperman', true) addEventHandler('setSuperman', root, function() bindKey("jump", "down", Superman.onJump) addCommandHandler("superman", Superman.cmdSuperman) end ) Can't post the whole code because nothing appears
  7. JR10

    Wanted Level

    Did u edit the timer or YOU JUST COPIED IT?????
  8. Try this: server side -- Copyright (c) 2008, Alberto Alonso -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright notice, this -- list of conditions and the following disclaimer in the documentation and/or other -- materials provided with the distribution. -- * Neither the name of the superman script nor the names of its contributors may be used -- to endorse or promote products derived from this software without specific prior -- written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. local Superman = {} -- Static global values local rootElement = getRootElement() local thisResource = getThisResource() -- Resource events addEvent("superman:start", true) addEvent("superman:stop", true) -- -- Start/stop functions -- function Superman.Start() local self = Superman addEventHandler("superman:start", rootElement, self.clientStart) addEventHandler("superman:stop", rootElement, self.clientStop) end addEventHandler("onResourceStart", getResourceRootElement(thisResource), Superman.Start, false) function Superman.clientStart() setElementData(client, "superman:flying", true) end function Superman.clientStop() setElementData(client, "superman:flying", false) end addEventHandler('onPlayerLogin', root, function(prev, account) local accName = getAccountName ( account ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent(source, 'setSuperman', source) end end ) client side in next reply don't know why nothing shows up
  9. JR10

    Help me Blip

    Don't double post use the "edit" botton instead, and ddi u edit it like i said? nvm just give me the variable of the object you want to create the blip for.
  10. JR10

    Help me Blip

    Add it and you should adjust it its only to show you the function arguments.
  11. JR10

    Help me Blip

    use this: blip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()]
  12. JR10

    Can you Help Us

    Here: function ResourceStartOS ( name, root ) for k,v in ipairs(players) do bindKey ( v, "o", "down", placeOSBeacon ) end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), ResourceStartOS ) function OSPlayerJoin () bindKey ( source, "o", "down", placeOSBeacon ) end addEventHandler ( "onPlayerJoin", root, OSPlayerJoin ) I don't know what is this resource but the bindKey is what makes you press on "o" and it works so check if the player is admin then use bindKey.
  13. JR10

    Cars_Team

    No problem, and when you face any problems you can post it here (with the code).
  14. JR10

    Problems

    function removeHEX(oldNick,newNick) if (string.find(newNick,"{JWORLD}")) then local account = getPlayerAccount(source) local accountName = getAccountName(account) if not isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then outputChatBox("You can't have our beginning nick.", source, 255, 0, 0) cancelEvent() end end end addEventHandler("onPlayerChangeNick",getRootElement(),removeHEX)
  15. JR10

    Cars_Team

    What code?, i gave you the function it's easy to make a vehicle restriction script, you should do it by yourself, we don't give out the code here we just help you fix yours.
  16. Then translate what i say.
  17. JR10

    Cars_Team

    Why are you using acl for teams? use the normal team system, and you should add user.Accountname in the group.
  18. JR10

    Cars_Team

    acl ?? That code is not for acl its for teams isObjectInACLGroup click on the function for a job.
  19. JR10

    Wanted Level

    Maybe try this: function wanted( ammo, attacker, weapon, bodypart ) if (attacker) and (attacker ~=source) then setPlayerWantedLevel ( attacker, getPlayerWantedLevel( attacker )+1 ) else local wanted = getPlayerWantedLevel( source ) setTimer(setPlayerWantedLevel, 1000, 1, source, wanted) --1000 is 1 sec and it should be the time taken to spawn you should specify this yourself end end addEventHandler ( "onPlayerWasted", getRootElement(), wanted )
  20. JR10

    Cars_Team

    copVehicles = { [523]=true,[598]=true, [596]=true,[597]=true,[599]=true} copTeams = { ["Military"]=true,["Police"]=true } function copenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if not team then return end if ( copVehicles[getElementModel ( source )] ) and ( not copTeams[getTeamName(team)] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You aren't a Police Officer , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) A mistake in your copVehicles table.
  21. JR10

    Cop mode MTA?

    i didn't tell you that there is another one i told u to search so obviously YOUR RETARDED.
×
×
  • Create New...