Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. Good, because by then you would know the entered variable was 'nil'.
  2. Et-win

    Memo

    local gText = guiGetText(memo) if (gText ~= false) then guiSetText(memo, gText.."\n"..account) end
  3. Et-win

    Question

    function weapons ( ) if not (isAllownedPlayer(localPlayer)) then return end outputChatBox("Test1") local x,y,z = getElementPosition(localPlayer) local minigunw = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") for _, player in ipairs(getElementsByType("player")) do xz , xs , xt = getElementPosition (player) setWeaponTarget ( minigunw , xz , xs , xt ) end end end addCommandHandler("mini", weapons) *Also wonders why the weapon functions are not linked + colored*
  4. Et-win

    Question

    function weapons ( thePlayer) if not (isAllownedPlayer(thePlayer)) then return end outputChatBox("Test1") local x,y,z = getElementPosition(thePlayer) local minigunw = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") for _, player in ipairs(getElementsByType("player")) do xz , xs , xt = getElementPosition (player) setWeaponTarget ( minigunw , xz , xs , xt ) end end end addCommandHandler("mini", weapons) Guess it is server-sided. Does it output "Test1" ?
  5. ... function onLogin(previousAccount, currentAccount) if not getAccountData(currentAccount, "p_money") or not getAccountData(currentAccount, "p_money") == nil then setAccountData(currentAccount, "p_money", 0) end end addEventHandler("onPlayerLogin", root, onLogin) Even though you have your answer now, I still want you to answer this question: Do you even use debugscript 3?
  6. Et-win

    Question

    function weapons ( localPlayer) if not (isAllownedPlayer(thePlayer)) then return end Parameter wrong.
  7. Because you are starting both 'moveGate' and 'moveBack' functions when you hit the marker.
  8. No, everything was correct. But you have to start function 'PanelAdmin' as soon as the resource starts. Then inside the function 'PanelAdmin', set the 'window' invisible with 'guiSetVisible'.
  9. account thePreviousAccount, account theCurrentAccount, bool autoLogin @ onPlayerLogin. So...... You are getting the PREVIOUS account now. Get the CURRENT account.
  10. function moveGate() if getAccountName(getPlayerAccount(source)) == "Florjan22" then moveObject(gate, 5000, 1556.36, -2348.79, 16.54) end end addEventHandler("onPlayerMarkerHit", marker, moveGate) EDIT: Changed 'onPlayerMarkerHit' so it only activates when a player enters. In your function you forgot to define 'player' in the function.
  11. Ah, just asking. Don't mind me. *cough* But you didn't start function 'PanelAdmin', so 'guiGetVisible' can't find 'window'. Just start the function, and on the last line before 'end' set it invisible.
  12. If I was you I should use what Sasu just said.
  13. You didn't look what I did. local gPlayerAccount = getPlayerAccount(player) if (gPlayerAccount ~= false) and (isGuestAccount(gPlayerAccount) == false) then First get the player's account and check or he is logged in, if so, if not on Guest account, then continue.
  14. triggerClientEvent("onDeleteHands", root, playerTable) Probably to: triggerClientEvent(v, "onDeleteHands", root, playerTable)
  15. Et-win

    Help :'(

    Go to the Map Editor and open the map, then place more spawnpoints?
  16. 1. What error? 2. function onKeyUse( element ) if ( hasObjectPermissionTo ( element, "function.setServerPassword", true ) ) then triggerClientEvent( element, "Show", element ) end end I hope you aren't going to put backdoors in and put it online?
  17. It means there already is an event handler for that function with the same event.
  18. Did you do the other functions too? And you need to add event 'onPlayerLogin' and then give the player her/his money.
  19. Et-win

    Help :'(

    Please, 1 topic is enough. I'm sure Google will help you: https://www.google.nl/search?hl=nl&q=Mu ... gws_rd=ssl (More than this I don't know about Zombie resources )
  20. Btw, why like this? Because on every frame it re-creates the codes you have in that function which is on event 'onClientRender'. (Because it's only created for 1 frame only) Which means, variables are awesome!
  21. local gMap = exports.mapmanager:getRunningGamemodeMap() local mapRoot = getResourceRootElement(gMap) getElementsByType("sound", mapRoot)
  22. --Server function getPlayerMoney ( player ) local m = false local gPlayerAccount = getPlayerAccount(player) if (gPlayerAccount ~= false) and (isGuestAccount(gPlayerAccount) == false) then m = tonumber ( getAccountData ( gPlayerAccount, "p_money" ) ) if ( not m ) then m = 0 setAccountData ( player, "p_money", 0 ) end end return m end I did the first one, you can do the rest (getPlayerAccount(player)) (If the player was not logged in, then it returns 'false')
  23. First get the player's account, and then do set/getAccountData.
×
×
  • Create New...