Jump to content

Simple0x47

Members
  • Posts

    1,518
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Simple0x47

  1. It should be like this: addEventHandler ( "onPlayerChat", root, function ( msg, type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then cancelEvent ( ) local function outputMessage(author,message) outputChatBox("#ff0000[T] #FFffff"..author..": #FF0000"..message,getRootElement(),0,0,0,true) end local function changetag(author,message) outputChatBox("#ff0000[Tulaj] #FFffff"..author..": #FFd700"..message,getRootElement(),0,0,0,true) end addCommandHandler("rang",changetag) end
  2. Remember that Google Traductor it's not the best way to speak english, cuz it does some strange things, what you've said has no sense with what I said.
  3. You guys don't need a supervisor like you say, there's almost no activity, thing which happens in lots of other languages section. Be more active and bring people into the Algerian section, maybe one day you'll get the rank.
  4. That's why if you compare the Source clicked with the button you want it will avoid the double-click.
  5. You could add a tick count on the clientside on Render and then pass the info to the server by an event.
  6. You should do it like this. function giveWeapong() if ( source == GUIEditor.button[2] ) then -- You can add more statements for giving more weapons making the script shorter and in just one function triggerServerEvent("giveWeapon", localPlayer, "M4") end end addEventHandler("onClientGUIClick", root, giveWeaponG)
  7. It could be because you used SAMP or Cheat Engine. I'll recommend to restart your PC.
  8. A. Yes, you keep going with gif's :v Q. Do you know 0 A.D?
  9. A. If I'd know how, for sure. Q. Why does FaHaD have a hand like profile picture?
  10. Hello MTA people, I'd like to know the preferences of the players in here about their favorite gamemodes, and maybe make a server based on these results. Thanks for the attention and for the vote.
  11. Ah sorry, I forgot to close that quote. addEvent("onServerSynced", true) function syncText( c ) if ( c ) and ( guiGetVisible( GUIEditor.edit[1] ) ) then triggerServerEvent("onSyncText", localPlayer, text1 ) end end addEventHandler("onClientCharacter", root, syncText ) function changeText( text ) if ( text1 ~= text ) then text1 = text end end addEventHandler("onServerSynced", root, changeText)
  12. The loop is for syncing the text for all the players into the server, and the onServerSynced event it's for making the change of the text in the clientside.
  13. Nice idea. But the right click menu editor has no content into it, I'm the only one?
  14. Ah, so you're trying to make the text from a player show to all of them? If it's like that then this will help you. CLIENT: addEvent("onServerSynced", true) function syncText( c ) if ( c ) and ( guiGetVisible( GUIEditor.edit[1] ) then triggerServerEvent("onSyncText", localPlayer, text1 ) end end addEventHandler("onClientCharacter", root, syncText ) function changeText( text ) if ( text1 ~= text ) then text1 = text end end addEventHandler("onServerSynced", root, changeText) SERVER: addEvent("onSyncText", true) function syncServer( text ) if ( text ) then local players = getElementsByType("player") for i = 1, players do local p = players[ i ] triggerClientEvent( p, "onServerSynced", p, text ) end end end addEventHandler("onSyncText", root, syncServer)
  15. Simple0x47

    Texturi

    Texturi ai putea descarca in format .png si dupaia sa creezi un .txd cu TXDworkshop sau sa schimbi textura de la un .txd deja existent.
  16. Check the coordinates if they're correct. Cuz maybe it fits out of the screen or something.
  17. That's due to the combo, just save the victim life and make a comparation to see how much did the katana low. If it lows more than x value then cancelEvent and setElementHealth for making a normal damage.
  18. Just make some reverse engineering, making the functions that CIThelp has.
  19. I don't see any definition, but anyway. Replace the onClientRender with this for checking if text1 has any value on clientside. addEventHandler ( 'onClientRender',root, function ( ) outputChatBox( text1 or "TEXT1 HAS NO VALUE", 0, 255, 0 ) dxDrawText(text1, (screenW * 0.2924) + 1, (screenH * 0.3778) + 1, (screenW * 0.7014) + 1, (screenH * 0.5400) + 1, tocolor(0, 0, 0, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) dxDrawText(text1, screenW * 0.2924, screenH * 0.3778, screenW * 0.7014, screenH * 0.5400, tocolor(0, 186, 255, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) end ) If the chat outputs "TEXT1 HAS NO VALUE" then take a look at the content of the editbox.
  20. Are you sure that text1 has a value? Try to make an outputChatBox in the onClientRender for checking if it has any value.
  21. You can do it like this. local myX, myY = 1280, 1024 -- The resolution you've used for making the guis local sX, sY = guiGetScreenSize() -- The resolution of the player local gX, gY, gW, gH = 500, 500, 250, 50 -- The size of the image obtained from the guieditor with my resolution 1280 1024 local rX = gX / myX -- (0.3906) We obtain the relative position, for making it equal in all screen resolutions local rY = gY / myY -- (0.4883) local rW = gW / myX -- (0.1953) local rH = gH / myY -- (0.0488) local aX = sX * rX -- Now we multiply the relative position obtained previously by the client resolution for having an absolute position from the client screen local aY = sY * rY local aW = sX * rW local aH = sY * rH dxDrawImage( aX, aY, aW, aH, "image.png" ) -- Now you know what you have to do, so you can make it smaller by making the calculations directly.
  22. I think you're looking for this. function tintCar() -- Applies the shader for all the infernus local shader = dxCreateShader("tint.fx", 1, 0, true ) local vehicles = getElementsByType("vehicle") for i = 1, #vehicles do local v = vehicles[ i ] if ( getElementModel( v ) == 411 ) -- you can also add a comparation for just tinting for those infernus which are bought tinted engineApplyShaderToWorldTexture( shader, "plm_glass", v ) end end end addEventHandler( "onClientResourceStart", root, tintCar )
  23. Son formulas que tristemente desconozco, pero creo que se emplea pitagoras. También podrías intentar obtener una relatividad obteniendo los pixeles del borde que hay entre una velocidad y la siguiente.
  24. You would have to use this event onClientCursorMove
×
×
  • Create New...