Jump to content

Eth

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Eth

  1. addEventHandler ( "onClientClick", getRootElement() function (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, element) if not isCursorShowing() then return end if element and getElementType(element) == "player" then --your code end end) You still didn't get me, I want to know if there is a way to detect if a player has clicked on an other player , I tried to use onClientClick, but the problem is that onClientClick requires you to have the cursor on in order for it to work, if the player cursor is not showed then onClientClick doesn't work and I don't want that
  2. I know, but the event doesn't trigger if the player's cursor is not on.
  3. That would work, but I want to detect if a mouse has clicked on a player so onclientkey won't work like expected
  4. as title says, onclientclick function is only executed when showcursor is true. and I am pretty sure it's something wrong in mta because I saw this page here: https://bugs.multitheftauto.com/view.php?id=2509 and I tried Jax test script, and it works only (output "clicked") if I have showcursor enabled but does nothing when showcurser is disabled, any ideas?
  5. Eth

    Animation Name

    Hello guys, please watch this video: what is this animation? thanks!
  6. hmm no, the problem is, when I use WarpPedIntoVehicle the player gets in the vehicle for One second after that he is automaticly out with no reason
  7. Hello there, Right now I have this script: triggerClientEvent (cuffedPlayer,"onPlayerunCuffed", cuffedPlayer,true) setPedAnimation(cuffedPlayer,false) setElementFrozen(cuffedPlayer,false) setElementData(cuffedPlayer,"cuffed",0) setElementData(cuffedPlayer,"tazed",0) setElementData(cuffedPlayer,"jailed",1) setElementData(cuffedPlayer,"BeingArrested",1) setElementData(playerSource,"ArrestingPlayer",otherPlayer) setElementData(playerSource,"Arresting",1) local theVehicle = getPedOccupiedVehicle ( playerSource ) warpPedIntoVehicle(cuffedPlayer, theVehicle,1) triggerClientEvent (playerSource, "showArrestMarker", playerSource,true) I put this script in /arrest ommand but when the cuffedPlayer is wrapped inside the vehicle he gets out of it and he returns back to the spawn position (I have no Idea why) "onPlayerunCuffed" client side: function onPlayerunCuffed() uncuffPlayer() end function uncuffPlayer() if isTimer ( uncuffTimer ) then killTimer(uncuffTimer) end setElementFrozen(localPlayer,false) setElementData(localPlayer,"cuffed",0) setPedAnimation(localPlayer,false) end Can anyone please help?
  8. change playerSource to source.
  9. Eth

    Lookat camera

    Hello there guys, is there any way to set player to look at the camera? I am doing character selection similar to samp one.
  10. Hello guys, I am sorry if I have posted this question on the wrong section, I was confused where to post it . recently I have been trying to understand the mapmanager resource so I followed the tutorial on the wikia about it and it's really great! but here is my question, in the wikia it says: "Basically, the "onGamemodeMapStart" event gives us the handle of the map ("startedMap"), which we used to extract the handle of the resource containing the map ("mapRoot")." but let's say I have 3 maps : map1.map,map2.map,map3.map and all of them are attached to the gamemode, which map is going to start and why?
  11. lol I finally fixed it, Instead of placing the onplayerconnect on the "onPlayerConnect" handler I put it "onPlayerJoin" lol
  12. Yes the debugscript doesn't show any type of erros and even when I try to restart the server. I tried to delete the first thePlayer and it still doesn't work
  13. addEventHandler("ShowLoginWindow",root,LoginWindowShow) addEventHandler("ShowRegisterWindow",root,RegisterWindowShow) I changed it like you told me but still it doesn't show up
  14. Hello there, so right now I am making a register/login window for my game using mysql , everything is working fine so far but for some reason triggerClientEvent doesn't want to be executed. here is the code: OnPlayerConnect: dbQuery( CheckPlayerAccount,{playerNick}, database_connection, "SELECT `Password`,`ID`,`Banned` FROM `players` WHERE `Username`='"..playerNick.."'") CheckPlayerAccount: function CheckPlayerAccount(qh,Player) local result = dbPoll( qh, 0 ) local thePlayer = getPlayerFromName ( Player ) outputChatBox(Player) outputDebugString("Player Name is "..Player) if(result == true) then triggerClientEvent ( thePlayer, "ShowLoginWindow", thePlayer,true) triggerClientEvent ( thePlayer, "ShowRegisterWindow", thePlayer,true) else triggerClientEvent ( thePlayer, "ShowLoginWindow", thePlayer,true) triggerClientEvent ( thePlayer, "ShowRegisterWindow", thePlayer,true) end end Client Side: function RegisterWindowShow(show) outputDebugString("Dsd") if(show == true) then guiSetVisible(RegisterPanel.Window[0], true) showCursor(true) else guiSetVisible(RegisterPanel.Window[0], false) showCursor(false) end end function LoginWindowShow(show) outputDebugString("Dsd") if(show == true) then guiSetVisible(LoginPanel.Window[0], true) showCursor(true) else guiSetVisible(LoginPanel.Window[0], false) showCursor(false) end end addEvent("ShowLoginWindow",true) addEvent("ShowRegisterWindow",true) addEventHandler("ShowLoginWindow",localPlayer,LoginWindowShow) addEventHandler("ShowRegisterWindow",localPlayer,RegisterWindowShow) now the debugstring shows my name just fine in the server sideso the code should be working, but somehow the debugstring in both ShowLoginWindow and ShowRegisterWindow aren't working, what could be the problem?
  15. Eth

    hey please help me

    have you used any hack?
  16. ------------------------------ Message de salutations ------------------------------ addEventHandler('onPlayerJoin', root, function() local oldAllowed = wasAllowedList[player] local newAllowed = isPlayerAllowedHere(player) wasAllowedList[player] = newAllowed if newAllowed and not oldAllowed then outputChatBox("Bienvenue sur GuilAndreas", value, 25, 45, 35, false) if oldAllowed and not newAllowed then function outputChatBox(joueur) outputChatBox("Salut, "..getPlayerName(joueur).." content de te revoir !", value, 35, 45, 25, false) end end end end ) ------------------------------ Message d'arrivée ------------------------------ addEventHandler('onPlayerLogin', root, function() function outputChatBox(joueur) outputChatBox(..getPlayerName(joueur).."s'est connécté !", value, 0, 255, 0, true) end end ) ------------------------------ Message de déconnexion ------------------------------ addEventHandler('onPlayerQuit', root, function() function outputChatBox(joueur) outputChatBox(..getPlayerName(joueur).."s'est déconnécté !", value, 255, 0, 0, true) end end ) ------------------------------ Message de connexion ------------------------------ addEventHandler('onPlayerLogin', root, function() outputChatBox("Vous êtes maintenent en ligne", value, 100, 255, 100, false) end ) ------------------------------ Message de déconnexion ------------------------------ addEventHandler('onPlayerLogout', root, function() outputChatBox("Vous êtes maintenent hors ligne", value, 255, 100, 100, false) end ) try it, I am not sure if it will work
  17. try to change this : bluehouse = createPickup( eX, eY, eZ,3,1272,0); to this: bluehouse = createPickup( t[1], t[2], t[3],3,1272,0);
  18. Try that and tell me if you see "ss" and "ss2" and "ss3" and "ss4" on debug string if isMouseWithinRangeOf(b.x , b.y , b.w, b.h) then dxDrawRectangle(b.x ,b.y ,b.w,b.h,tocolor(0,255,255)) if b.text then dxDrawText ( b.text, b.x , b.y , b.x + b.w , b.y + b.h , tocolor(255,255,255), sW/1600, myFont, "center", "center") outputDebugString("ss5") end end function isMouseWithinRangeOf(posX, posY, sizeX, sizeY) outputDebugString("ss4") local sW, sH = dxGetMaterialSize(RTE_Demo) if isCursorShowing() == false then outputDebugString("ss3") return false end local cx,cy = getCursorPosition() cx,cy = cx*sW,cy*sH outputDebugString("ss1") if cx >= posX and cx <= posX+sizeX and cy >= posY and cy <= posY+sizeY then outputDebugString("ss") return true,cx,cy else return false end end when you open the game, go to that button and there should be debug messages
  19. show me the part where you get if the mouse is near the button or not..
  20. Try to delete that file from meta.xml and if you see the other player weapon then the problem is in the Mod
  21. try that: local weapon = getPedWeapon (getLocalPlayer()) local weaponID = getWeaponNameFromID (weapon) dxDrawText("Weapon: "..weaponID..".", (0.585)*sWidth, (0.087)*sHeight, (0.293)*sWidth, (0.263)*sHeight, tocolor (64, 64, 64, 255),1.4,"pricedown","left","top",false,false,false,true)
×
×
  • Create New...