Jump to content

S3Nn4oXx

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by S3Nn4oXx

  1. Look what I've made client.lua function outputClick(mouseButton,buttonState,player) local screenW, screenH = guiGetScreenSize() local money = getPlayerMoney( localPlayer ) local plrName = getPlayerName( localPlayer ) local weaponType = getPedWeapon( localPlayer ) local playerHealth = getElementHealth( localPlayer ) dxDrawImage((screenW - 721) / 2, (screenH - 572) / 2, 721, 572, "mboy-glassy-login.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(money, 630, 315, 766, 363, tocolor(255, 255, 255, 255), 1, font ) dxDrawText(playerHealth, 630, 349, 766, 397, tocolor(255, 255, 255, 255), 1, font ) dxDrawText(plrName, 653, 234, 871, 293, tocolor( 111, 155, 0, 255 ), 1, myFont, "left", "top", false, false, false, true, false ) myFont = dxCreateFont( "CreteRound-Italic.otf", 18 ) font = dxCreateFont( "Impregnable.ttf", 11, true ) end addEvent( "onClick", true ) addEventHandler( "onClick",resourceRoot, outputClick ) function frozen() setPedFrozen(localPlayer, false) removeEventHandler( "onClientRender",root, outputClick) end bindKey( "H", "down", frozen ) function frozen1() setPedFrozen(localPlayer, true) addEventHandler( "onClientRender",root, outputClick ) end addEventHandler( "onClick",resourceRoot, frozen1) server.lua function outputCommand(mouseButton,buttonState,source,player) triggerClientEvent ( "onClick", resourceRoot ) end addEventHandler("onPlayerClick",getRootElement(),outputCommand) How I make getPlayerAccount near "Username:" text ? and when i Click on the screen it shows the Image how i can do that when i click only on the Player?
  2. S3Nn4oXx

    Warzone

    It's my first time that I'm using it '-' server.lua: function awe ( playerSource, fX, fY ) if ( fY and fX ) then local tempCol = createColRectangle ( fX, fY, 10.0, 10.0 ) if ( tempCol == false ) then else if ( theZone ~= false ) then destroyElement ( theZone ) end theZone = tempCol end end end addEvent( "zone", true ) addEventHandler( "zone", resourceRoot, awe ) client.lua: GUIEditor = { button = {}, window = {}, edit = {}, label = {} } function gui( ) local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 282) / 2, (screenH - 92) / 2, 282, 92, "WarZone Control ", false) guiWindowSetSizable(window, false) create = guiCreateButton(114, 64, 54, 18, "Create", false, window) guiSetProperty(create, "NormalTextColour", "FFAAAAAA") yt = guiCreateLabel(10, 36, 44, 25, "Y:", false, window) boxe = guiCreateEdit(33, 33, 57, 21, "", false, window) xt = guiCreateLabel(100, 36, 21, 18, "X:", false, window) boxe1 = guiCreateEdit(121, 33, 57, 21, "", false, window) zt = guiCreateLabel(188, 36, 21, 18, "Z:", false, window) boxe2 = guiCreateEdit(209, 33, 57, 21, "", false, window) addEventHandler ( "onClientGUIClick", create, setZone, false ) end addCommandHandler( "warzone", gui ) function setZone( ) triggerServerEvent ( "zone", resourceRoot ) end How can i make it in client.lua ? local screenW, screenH = guiGetScreenSize() ERROR
  3. S3Nn4oXx

    Warzone

    "Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone" Click on the function there's an example read it and try to make it ,if you failed post the code "attempt to call global 'guiGetScreenSize' (a nil value)" Line: local screenW, screenH = guiGetScreenSize() Server.lua GUIEditor = { button = {}, window = {}, edit = {}, label = {} } function gui( ) local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 282) / 2, (screenH - 92) / 2, 282, 92, "WarZone Control ", false) guiWindowSetSizable(window, false) create = guiCreateButton(114, 64, 54, 18, "Create", false, window) guiSetProperty(create, "NormalTextColour", "FFAAAAAA") yt = guiCreateLabel(10, 36, 44, 25, "Y:", false, window) boxe = guiCreateEdit(33, 33, 57, 21, "", false, window) xt = guiCreateLabel(100, 36, 21, 18, "X:", false, window) boxe1 = guiCreateEdit(121, 33, 57, 21, "", false, window) zt = guiCreateLabel(188, 36, 21, 18, "Z:", false, window) boxe2 = guiCreateEdit(209, 33, 57, 21, "", false, window) addEventHandler ( "onClientGUIClick", create, setZone, false ) end addCommandHandler( "warzone", gui ) function setZone ( playerSource, fX, fY ) if ( fY and fX ) then local tempCol = createColRectangle ( fX, fY, 10.0, 10.0 ) if ( tempCol == false ) then else if ( theZone ~= false ) then destroyElement ( theZone ) end theZone = tempCol end end end and GUI I can make it only in Client side, how do i make it in server side?
  4. S3Nn4oXx

    Warzone

    "Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone" There is three editboxes of Y: X: Z: I just need to fill it then it creates the warzone there
  5. S3Nn4oXx

    Warzone

    Hello guys, There is three Editboxes Y: X: Z: so how i make it when i fill the boxes so it creates a warzone createColRectangle
  6. Username:SpRoXx Your name(Full and last name):Ilay Yosef Why do you want free MTA Server?:Because I have experience as an owner, and i don't have money to buy a server Server Slots:210 Your Skype:thkhh75 Your Email:[email protected]
  7. Debugscript says expected near '(' at like 3
  8. I want example 2 ' How i can replace it from gui to dxDrawRectangle ?
  9. Can you show me example?
  10. JR10? I mean When i type the command in the first time I dont need to wait, and when i do in the second time so i need to wait
  11. Hello guys can you show me example of setTimer, I mean when i do in the first time the command /cmdname then it shows me the remaining time Thanks Sorry for all the questions i just want to learn Lua
  12. EDIT:I mean, when I type the command to the image appears then it disappeared with an animation
  13. Someone knows a script that when i type /command then the image appears Thanks for your Attention
  14. S3Nn4oXx

    Hamachi

    I can make a server without to open ports via Hamachi ? If yes Send me a link how Thanks
  15. S3Nn4oXx

    Help

    Btw how to do that when i write "What's my ping?" elso ? function myping (msg,t) if msg == "my ping" then cancelEvent() outputChatBox(getPlayerName(source).."'s #FF4923ping is : "..getPlayerPing(source),root,255 ,0, 0, true ) end end addEventHandler("onPlayerChat", root,myping)
  16. S3Nn4oXx

    Help

    Oh right i forgot ) Thanks function myping (msg,t) if msg == "my ping" then cancelEvent() outputChatBox(getPlayerName(source).."'s #FF4923ping is : "..getPlayerPing(source),root,255 ,0, 0, true ) end end addEventHandler("onPlayerChat", root,myping) Dat works fine now
  17. S3Nn4oXx

    Help

    Works fine but how do i make getPlayerName too ? outputChatBox(getPlayerName(source), source).."#FF4923Ping Is: "..getPlayerPing(source),source,255,0,0) ?
  18. S3Nn4oXx

    Help

    Guys how to do getPlayerPing in server.lua? addEventHandler("onPlayerChat", root, function (msg) if msg == 'my ping' then local ping = getPlayerPing(getLocalPlayer(source)) outputChatBox("Your Ping is:"..getPlayerPing, root) cancelEvent() end end ) EDIT:
  19. t3wz You are the best <3, Thanks i learned a lot! EDIT: can you add me on skype: thkhh75, I really don't get the argument thing
  20. Hello guys i really interesting in Lua and it's really cool so look what i made here, ik that i can't do getLocalPlayer i think, so how i am supposed to do that ? server.lua function Lol() local localPlayerName = getPlayerName(getLocalPlayer()) outputChatBox ( "#164F8C[TEXT]..localPlayerName..#FFFFFFis Laughing out loud!", getRootElement(), 255, 255, 255, true ) end addCommandHandler("lol", Lol) Btw I want to learn how to do that when i type /lol [otherplayername] so it shows in mainchat, [TEXT]PlayerName thinks [otherplayername] is Laughing out Loud and when i type just /lol so it shows [MyName] Is laughing out loud and when i type /lol [otherplayername] it shows [MyName] thinks [otherplayername] is Laughing out loud Thanks for your attention!
×
×
  • Create New...