Jump to content

Norhy

Members
  • Content Count

    125
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Norhy

  • Rank
    Sucka
  1. Norhy

    first person

    hey guys i have this fp script player = getLocalPlayer() function findRot(x1, y1, x2, y2) local t = -math.deg(math.atan2(x2 - x1, y2 - y1)) return t < 0 and t + 360 or t end addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getPedBonePosition(player, 6) setCameraMatrix(x, y, z) end ) addEventHandler("onClientCursorMove", getRootElement(), function(_, _, _, _, wX, wY, wZ) local x, y, z = getPedBonePosition(player, 6) setPedRotation(player, findRot(x, y, wX, wY)) end ) the pro
  2. Norhy

    key hold

    hey. How do i check if a player is holding a key?
  3. Norhy

    login help

    hey. I am making a login panel and i use the server event onPlayerJoin to display the login panel, however, the panel displays only when the player has the download finished. That means when a player joins for the first time the panel won't show because he is downloading the data, but when he join second time the panel show. How to i fix it?
  4. Please, how do I create a right-click menu like the one in the resource gui editor?
  5. Norhy

    Money

    Please, what's wrong in this code? if (getPlayerMoney(player) > 2500) then -- and then setPlayerMoney(player, getPlayerMoney(player) - 2500 ) It is Client-side.
  6. Norhy

    Login Handler

    triggerServerEvent('submitLogin',localPlayer,username,password)
  7. Norhy

    Login Handler

    addEvent( "submitLogin", true) function loginHandler(username,password) local account = getAccount ( username, password ) if ( account ~= false ) then logIn(source, account, password) triggerClientEvent(source,"HideGui",source) else outputChatBox("Zle zadane Meno alebo Heslo, skus znova prosim.",source) end end addEventHandler("submitLogin",root,loginHandler) And then i have the registerHandler, but that is working fine, just need help with the login.
  8. Norhy

    Login Handler

    Both are defined, also, i tried that method before but it doesn't work.
  9. Norhy

    Login Handler

    Hello guys. I'm making a Login panel, but somehow i cannot log-in. I tried using an another panel and it worked with the same code. local account = getAccount ( username, password ) if ( account ~= false ) then Error: bad argument at getAccount expected string at argument 1, got boolean. I don't see any mistake there, do you?
  10. function deathMoney ( player ) if (getPlayerCount < 2) then outputChatBox ( "Na serveri nie je dostatok (2) hráčov aby si získal odmenu!", getRootElement(), 0, 255, 0, true ) else local reward = math.random(2000, 3000) givePlayerMoney ( source, reward ) outputChatBox ( "Zdochol si! Tvoja odmena za túto mapu je " .. reward .. "$!", getRootElement(), 0, 255, 0, true ) end end addEventHandler ( "onPlayerWasted", getRootElement(), deathMoney ) Tried this, doesn't work.
  11. function deathMoney ( player ) local reward = math.random(2000, 3000) givePlayerMoney ( source, reward ) outputChatBox ( "Zdochol si! Tvoja odmena za túto mapu je " .. reward .. "$!", getRootElement(), 0, 255, 0, true ) end addEventHandler ( "onPlayerWasted", getRootElement(), deathMoney ) This is my code which will give a player between 2k and 3k$. The problem is that the player gets it everytime. I want to make it possible only when there are atleast 2 players online, but don't know how. Any functions?
  12. WARNING: Bad Argument @ 'triggerClientEvent' [Expected element at argument 3, got none ]. I think that it was not needed to remove the argument, however your and mine codes, both don't work
  13. This is my server-side: function showMenu ( ) triggerClientEvent ( source, "ShowAmmu", source ) end addEventHandler ( "onMarkerHit", ammuSell, showMenu, false )
  14. wdwMenu = guiCreateWindow( 0.150, 0.150, 0.70, 0.70, "Ammunation", true ) guiSetVisible ( wdwMenu, false ) showCursor ( false ) function ShowTheMenu ( ) guiSetVisible ( wdwMenu, true ) showCursor ( true ) end addEvent ( "ShowAmmu", true ) addEventHandler ( "ShowAmmu", getRootElement (), ShowTheMenu ) When i enter the menu marker, nothing happens. I had a error but fixed it, still nothing happens. No errors and warnings, something's wrong?
×
×
  • Create New...