Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. now the error is: [2012-05-20 10:24:57] WARNING: duu\server.lua:19: Bad argument @ 'addAccount' [Expected string at argument 2, got nil] [2012-05-20 10:24:57] WARNING: duu\server.lua:20: Bad argument @ 'logIn' [Expected player at argument 1, got string 'lowa'] I tryed to register as lowa
  2. damn I'm noob. I fogot to add server.lua into it. Thanks KENIX !!
  3. it say that is event not added to the serverside. Client function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(loginEdit["Username"]) local password = guiGetText(loginEdit["Password"]) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) end end end addEventHandler("onClientGUIClick", loginButton["Main"], clientSubmitLogin, false) function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(registerEdit["Username"]) local password = guiGetText(registerEdit["Password"]) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) end end end addEventHandler("onClientGUIClick", registerButton["Main"], clientSubmitRegister, false) Server addEvent("submitLogin", true) addEvent("submitRegister", true) function loginHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then triggerClientEvent (player, "hideLoginWindow", getRootElement()) end end end addEventHandler("submitLogin", root, loginHandler) function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then outputChatBox( "", root, 255, 255, 255 ) else account = addAccount(username, password) if (logIn(player, account, password) == true) then triggerClientEvent(player, "hideRegisterWindow", getRootElement()) end end end addEventHandler("submitRegister", root, registerHandler)
  4. local noob = getPlayerIP(source) function noobkicker() if noob == "94.18.22.209" then kickPlayer(source,"You Have Been Kicked By Harry's Noob Kicker.") end
  5. Take a look at community localchat resources.
  6. Thanks for letting me know !
  7. Client function Patriot() humvee = createVehicle ( 470, 208.60000610352, 1920.6999511719, 16.60000038147, 0, 0, 90 ) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) triggerServerEvent( "warpEvent", source, humvee ) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , Patriot) Server addEvent("warpEvent", true) function warp ( thePlayer, theCar ) warpPedIntoVehicle( thePlayer, theCar ) end addEventHandler("warpEvent", getRootElement(), warp) Didn't test it EDIT: if its bugged then setTimer !
  8. function playrules(thePlayer) -- you don't need to define command outputChatBox("#FFFB0ENo cheat No spam No disrespect ", thePlayer,255,255,255,true) end addCommandHandler("rules", playrules)
  9. Then modify the freeroam/play resource.
  10. try that: didn't test it function saveSkin( daPlayer ) setAccountData( getPlayerAccount( daPlayer ), "save-skin", getElementModel( daPlayer ) ) end addEventHandler("onPlayerWasted", getRootElement(), saveSkin ) function setSkin( daPlayer ) setElementModel( daPlayer, getAccountData( getPlayerAccount( daPlayer ) ), "save-skin" ) end addEventHandler("onPlayerSpawn", getRootElement(), setSkin )
  11. local theTable = { [1]={1812.65198, -1889.86047, 13.41406}, [2]={1825.22791, -1635.03711, 13.38281}, [3]={1855.01685, -1430.47449, 13.39063}, [4]={1732.81580, -1296.87122, 13.44294}, [5]={1473.19226, -1295.77124, 13.48315}, } This is the table how can I make when player hits a maker it destroys marker id 1 and show the marker ID 2? Sory but I don't know anything about tables.
  12. addEventHandler ( "robbergui", root, robbergui ) function buttonClick ( uPlayer ) if ( source == button ) then triggerServerEvent( "onRobberAccept", uPlayer ) elseif ( source == close ) then guiSetVisible (windowrobber, false) showCursor (false) end end addEventHandler ( "onClientGUIClick", getRootElement(), buttonClick ) some string error
  13. getElementHealth cancelEvent() "onVehicleDamage"
  14. Wei

    runcode

    I wanna make that when it outputs chat box that is only visible for player wich has executed...
  15. Wei

    Pickpocketing

    /debugscript 3 ? no errors Script now: addCommandHandler( "steal", function( thePlayer, commandName, otherPlayer, amount ) local amount = math.random(1,500) local chance = math.random(1,3) if otherPlayer and amount and math.ceil( amount ) == amount and amount > 0 then if getElementModel(thePlayer) == 29 then local other = getPlayerFromNick( otherPlayer ) if other then local x, y, z = getElementPosition( thePlayer ) local x2, y2, z2 = getElementPosition( other ) if(getDistanceBetweenPoints3D( x, y, z, x2, y2, z2 ) < 5) then if(chance == 3) then takePlayerMoney( other, amount ) givePlayerMoney( thePlayer, amount ) outputChatBox( "" .. getPlayerName ( thePlayer ) .. " stole $" .. amount .. " from you.", other, 255, 0, 0 ) outputChatBox( "You stole $" .. amount .. " from " .. name .. ". ", thePlayer, 0, 255, 0 ) else outputChatBox( "" .. name .. " escaped.", thePlayer, 255, 0, 0 ) end else outputChatBox( "" .. name .. " noticed that you tried to steal money.", thePlayer, 255, 0, 0 ) outputChatBox( "" .. getPlayerName ( thePlayer ) .. " tried to steal money from you, but failed.", other, 255, 0, 0 ) end else outputChatBox( "" .. name .. " is too far away.", thePlayer, 255, 0, 0 ) end end end end )
  16. Wei

    Pickpocketing

    Whats the problem ? addCommandHandler( "steal", function( thePlayer, commandName, otherPlayer, amount ) local amount = math.random(1,500) local chance = math.random(1,3) if otherPlayer and amount and math.ceil( amount ) == amount and amount > 0 then if getElementModel(thePlayer) == 29 then local other = getPlayerFromNick( otherPlayer ) if other then if player ~= other then local x, y, z = getElementPosition( thePlayer ) local x2, y2, z2 = getElementPosition( other ) if(getDistanceBetweenPoints3D( x, y, z, x2, y2, z2 ) < 5) then if(chance == 3) then takePlayerMoney( other, amount ) givePlayerMoney( thePlayer, amount ) outputChatBox( "" .. getPlayerName ( thePlayer ) .. " stole $" .. amount .. " from you.", other, 255, 0, 0 ) outputChatBox( "You stole $" .. amount .. " from " .. name .. ". ", thePlayer, 0, 255, 0 ) else outputChatBox( "" .. name .. " escaped.", thePlayer, 255, 0, 0 ) end else outputChatBox( "" .. name .. " noticed that you tried to steal money.", thePlayer, 255, 0, 0 ) outputChatBox( "" .. getPlayerName ( thePlayer ) .. " tried to steal money from you, but failed.", other, 255, 0, 0 ) end else outputChatBox( "" .. name .. " is too far away.", thePlayer, 255, 0, 0 ) end end end end end ) error: attempt to call global 'addCommandHandler' (a nil value)
  17. I think you need permissions from author. You can make your own admin panel to do that...
  18. lol you can edit original...
  19. Wei

    mute problem

    I know now. Thanks
×
×
  • Create New...