Jump to content

Saml1er

Retired Staff
  • Posts

    1,058
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Saml1er

  1. Everything depends on what exactly do you need. I can't set a price until someone tells me what I have to do for them.
  2. Replace this at line 8 and 38: guiSetVisible(weapons.window,false)
  3. It's summer! Get outside! Oh bons I really want to but I'm a Muslim and I fast for 16 hours so I feel really thirsty. Men, I can do only two things, use PC and sleep.
  4. Saml1er

    DX.GUI

    I used to think the same when I saw it for the first time but after I saw those exported functions, I was like "fk, no big difference still have to do it manually"
  5. Saml1er

    DX.GUI

    Who told you dxGUI is same like GUI editor? There are exported functions. You must do it manually. https://wiki.multitheftauto.com/wiki/Resource:DxGUI
  6. local weapons = { } -- lets use 1 table weapons.window = guiCreateWindow(471, 218, 367, 511, "WeAmmu Nation v1.0", false) guiWindowSetMovable(weapons.window, false) guiWindowSetSizable(weapons.window, false) guiSetVisible(weapons.WeAN,false) -- lets put this here, just to make it easy for you weapons.M4 = guiCreateButton(9, 50, 105, 41, "M4 \n2000$", false, weapons.window) guiSetProperty(weapons.M4, "NormalTextColour", "FFAAAAAA") weapons.Eagle = guiCreateButton(124, 50, 105, 41, "Desert Eagle \n500$", false, weapons.window) guiSetProperty(weapons.Eagle, "NormalTextColour", "FFAAAAAA") weapons.MP5 = guiCreateButton(239, 50, 105, 41, "MP5\n1000$", false, weapons.window) guiSetProperty(weapons.MP5, "NormalTextColour", "FFAAAAAA") weapons.Pistol = guiCreateButton(9, 101, 105, 41, "Pistol\n100$", false, weapons.window) guiSetProperty(weapons.Pistol, "NormalTextColour", "FFAAAAAA") weapons.SPAZ12 = guiCreateButton(124, 101, 105, 41, "SPAZ-12\n1500$", false, weapons.window) guiSetProperty(weapons.SPAZ12, "NormalTextColour", "FFAAAAAA") weapons.AK47 = guiCreateButton(239, 101, 105, 41, "AK-47\n1200$", false, weapons.window) guiSetProperty(weapons.AK47, "NormalTextColour", "FFAAAAAA") weapons.close = guiCreateButton(329, 19, 28, 27, "X", false, weapons.window) guiSetProperty(weapons.close, "NormalTextColour", "FFAAAAAA") local WeANmarker = createMarker ( 777, -2070, 11.5, "cylinder", 2, 0, 128, 0, 170 ) -- -- -- function WeANmarkerEnter () if source == WeANmarker then guiSetVisible(weapons.WeAN,true) showCursor ( true ) end end addEventHandler ( "onClientMarkerHit", getRootElement(), WeANmarkerEnter ) function buttonsz () if source == weapons.close then guiSetVisible(weapons.window,false) showCursor ( false ) ------- If you want to make your code a little more better then use 1 triggerServerEvent. You can use variables for that elseif source == weapons.M4 then triggerServerEvent("buyWeapon",getLocalPlayer(),"M4","2000","31","100") elseif source == weapons.Eagle then triggerServerEvent("buyWeapon",getLocalPlayer(),"Desert Eagle","500","24","50") elseif source == weapons.MP5 then triggerServerEvent("buyWeapon",getLocalPlayer(),"MP5","1000","29","100") elseif source == weapons.Pistol then triggerServerEvent("buyWeapon",getLocalPlayer(),"Pistol","100","22","50") elseif source == weapons.SPAZ12 then triggerServerEvent("buyWeapon",getLocalPlayer(),"SPAZ-12","1500","27","90") elseif source == weapons.AK47 then triggerServerEvent("buyWeapon",getLocalPlayer(),"AK-47","1200","30","100") end end addEventHandler ( "onClientGUIClick", root, buttonsz, false )
  7. 11 months or almost 1 year. Yes. PHP, CSS,HTML and java ( only basics and I use it for web developing stuff only ), SQL LITE, MySQL and XML . I would do that for free, I charge for a script if it takes me more than an hour. relative sizes Jail system: If someone wants a jail system then I can create it in 14 hours only if he provides me with coordinates but if he wants me to do everything for him then I'll create it in 12-15 hours maximum. ( I can finish this in 1 day because I'm on vacation ) Gang system with GUI: Now if someone wants a gang system with GUI then its really easy to create one and I can finish it in a few hours because I've experience in this. Trucker Job: If someone wants a simple trucker job with dx render and other stuff then I can create it in 6-8 hours or less because I know its not a hard job. I'll charge 5 $ for this. Btw everything depends on what exactly people need. If someone wants to buy my login panel and weapon shop then I'll sell them both together for 10 $ because this is how much hours I had to work on it and it was quite easy to make create them. If someone wants to buy my jail script for RPG their RPG server then I'll sell it for 15 $ because I know how much I had to work on that. I'm on whole day and night because I'm on vacation
  8. Hello, I was inactive since 4 months. I'm back and I decided to start scripting again. I've got many requests for scripting but since I was inactive so I couldn't give them a clear answer but this time if you're looking for a cheap scripter ( Yes cheap and I really mean it ) then yeah I can work for you if you're ready to pay. I don't really care if someone trusts me or no I was scripting for a friend for 20 days and here are the results: I made those scripts for Dayz gamemode for a friend and it seems his server is down, might be up idk. Weapon shop: http://imgur.com/W5Eh0w5 You can add more weapons btw I took images from another resource since I'm not ps user. Login panel: http://imgur.com/dZ55wxU This login panel also does animations like bouncing logo, moving texts ( userpanel and password ) and it works with website (SMF and phpBB support) and if you want I change it. Jail system: I'll upload it later. How the jail system works? Jail system is for Police vs Resistance. Police can also become a criminal if he kills an innocent person. 1. When someone commits a crime ( killing/shooting ) then you will see plain text "Criminal" on the top of his head. 2. Police has night stick. If police hits the criminal with night stick then criminal is sent to jail and police gets 40 exp. Police can also catch the criminal if police hijacks criminal's vehicle. 3. Police will get 20 exp if he kills the criminal. 4. When the criminal is sent to jail then the criminal will see a rectangle with 4 text. ( this dx rectangle is at left middle of the screen ) 5. after every 2 mins gates of jail are open ( after 30 sec it will close )and and there is a computer. Criminals have to go to that computer and hack it. 6. Now you'll be thinking how are they suppose to hack it? There is a password of 2 digits. The password is different for everyone and it is set randomly and it ranges from 1-50. 7. When you type the password if the password is greater than the generated number then + 1 is added to the generated number ( there's another text for that on screen so you don't need to worry ) and if it is lower than the generated number then 1 is subtracted from generated number. 8. If the generated number and the number entered by the criminal matches then the criminal is released. 9. The criminal only has 2 chances if he fails then he needs to wait till 5 mins are over and when 5 mins are over then he'll be released. 10. Police can also visit jail but they are not allowed to fight, they can just see how things go on. Lobby: <-- I started to work on it 2 days ago. I working on the main system and once main system is done then I can add as many arenas I want. http://i.imgur.com/OVisUZB.png http://i.imgur.com/Fq9LR3E.png http://i.imgur.com/Y9ikxS5.png I'm going to finish it within a month or less. Our server will be up soon but it will be locked and I'll be working on it. This all was within 20 days. I'm on vacation so I work day and night. Don't expect me to sell lobby because its for my clan only. Visit us at: gmc-game.com Don't judge a book by its cover! We are 2 scripters in our clan and we were both inactive for months and we are back now, Linkin came up with multigamemode idea and so on I decided to script it and I'm working on it atm ( we are back after a very huge inactivity). Linkin is busy with university but he still helps me when I'm away or I simply take break for a short time. Even tho you can see my skype in my pm but still... Skype : majid.sheikh95
  9. And sorry my bad I confused you, there's a line that converts seconds to miliseconds, although the function name is ms to string but still, you need call it with seconds but if you remove this line: local ms = ms * 1000 Then change this: local timeString = msToTimeStr( miliseconds ) Code works even now if you test it. ^^
  10. guiSetText getTickCount Usage: guiSetText (GuIElement, "Your text goes here") --[[ Now for getTickCount() ]] function msToTimeStr( ms ) --- miliseconds to string format "mm:ss" if not ms then return '' end local ms = ms * 1000 local s = math.floor( ms / 1000 ) local seconds = tostring( math.fmod( s, 60 ) ) if #seconds == 1 then seconds = '0' .. seconds end local minutes = tostring( math.floor( s / 60 ) ) if #minutes == 1 then minutes = '0' .. minutes end return minutes .. ':' .. seconds end local sx,sy = guiGetScreenSize() addEventHandler("onClientRender",root, function () if not tick then --- if tick variable does not exist then tick = getTickCount () --- create one end -- the if statement should be only till here thats why we put an end here local miliseconds = (getTickCount() - tick ) -- its actually current tick - old tick local seconds = miliseconds/1000 -- convert it to seconds local minutes = seconds/60 --- now convert it to minutes -- if you want a string format like "mm:ss" then local timeString = msToTimeStr( seconds ) --- we are calling this function which will convert seconds into a string dxDrawText (timeString,sx/2,sy/2,sx,sy) --- this will draw "mm:ss" format in the middle of screen end )
  11. Can you show us the part where you defined maker1? marker1 = ---------- ? function m1() marker2 = createMarker(-1292.881,-47.277,14.1484, "cylinder", 1.5, 250,243,5,240) blip2 = createBlip (-1292.881,-47.277,14.1484, 15) end addEventHandler("onClientMarkerHit",marker1,m1) What is [icon no.]? what are you trying to do?
  12. First download: https://wiki.multitheftauto.com/wiki/PHP_SDK <-- Downlaod latest version and make sure you remove line 80 or simply make it a dead line so php doesn't read the code: //echo Extract files to a folder and rename it "mtaphpsdk_0.4" and upload it to your root folder of website. Now all you need to do is to make a new PHP script in your root folder of your website and lets name it "MTA_login.php". You should be under this directory now: "public_html/MTA_login.php". Open your php file and paste your code if you don't know php scripting then you can use the code I wrote for someone. <?php include ("mtaphpsdk_0.4/mta_sdk.php"); include("SSI.php"); $input = mta::getInput(); $username = $input[0]; $password = $input[1]; $result = $smcFunc['db_query']('', ' SELECT passwd FROM {db_prefix}members WHERE member_name = {string:member_na} LIMIT 1', array( 'member_na' => $username, ) ); if ($smcFunc['db_num_rows']($result) !== 0) { while ($row = $smcFunc['db_fetch_assoc']($result) ) { if(sha1(strtolower($username) . $password) == $row['passwd']) { mta::doReturn("true"); } else { mta::doReturn("false"); } } } ?> Now all you need to do is to use callRemote ( REMEMBER THIS IS NOT AN efficient method. It will be better if you use fetchRemote.) Here's an example of using callRemote: function result(val) local val2 = tostring(val) if val2 == "true" then -- Now login the player with MTA functions or whatever you want to use elseif val2 == "false" --- Password/Username is invalid end end local username = "Saml1er" local password = "123456" callRemote ( "http://www.example.com/MTA_login.php", result, username,password ) NOTE: Make sure you've given admin rights to your resource.
  13. No one. If you think that you'll read an example for the first time and you'll understand everything then hell no. You'll have to read the same example with description and syntax again and again until you understand how everything works but that's not only the case. You'll need to copy and paste and try to make minor, very small changes. Download simple resources from community and try to read their scripts, remove unneeded lines and this is how you learn scripting. Remember, you'll have to be very patient while learning because you must know this nobody is born as a scripter. I'm scripting since 1 year and even now when ever I want to use a function then I go to wiki and search for it because you must know which parameter does what. If you don't give up then trust me you'll learn basics within 1 week. I learned scripting in a very weird way. I used to view codes but I'd never test them ( that's very bad ) and I'll give up within 2 mins and say "I'm not born for scripting" but as time passed I began to test these codes and gradually I was able to understand them.
  14. If you're using a free host then forget about it but if you've a forum then I can give you my script ( php script ) which I wrote. It works with SMF 2.0 forum and if you're using phpBB then still no problem, I can make it for you. ;P
  15. Then no. Why don't you make a command to add/remove admins from group ? If player has access to manage acl gridlist then he can remove high rank admins.
  16. gangs = { ["peF"] = true, ["SWAT"] = true, ["Dark Crew"] = true, -- you can add/remove gangs ["NoobGang"] = true, ["TestGang"] = true --- NOTE: don't need to add comma to the last one. } function spawnProelite (prevA, curA, spawn) if gangs[getElementData(source, "gang")] then spawnPlayer (source, 2529.24609375, 2024.0888671875, 11.18254, 181, 285, 0, 0, clan1) -- setPlayerMoney ( source, 2000 ) fadeCamera (source, true) setCameraTarget (source, source) giveWeapon ( source, 9, 1) giveWeapon ( source, 24, 120) giveWeapon ( source, 28, 550) giveWeapon ( source, 31, 450) else outputChatBox("You are not from this Clan !", source, 100, 100, 100, false) end end addEvent( "spawnPef", true ) -- addEventHandler( "spawnPef", root, spawnProelite ) --
  17. Colshape is not defined. Can you show us that part where you defined it?
  18. Its done with magic. <right name="general.adminpanel" access="false"></right> <right name="general.tab_players" access="false"></right> <right name="general.tab_resources" access="false"></right> <right name="general.tab_maps" access="false"></right> <right name="general.tab_server" access="false"></right> <right name="general.tab_bans" access="false"></right> <right name="general.tab_adminchat" access="false"></right> I think you know what to do next.
  19. Player must be logged in to execute "fly" command. -- server side function Staff_check(v) -- make a custom function so we don't have to write the same code again and again local acc = getPlayerAccount(v) if not isGuestAccount( acc ) then local accountname = getAccountName (acc)) local staff = "YourStaffGroupNameInAcl" -- first add a group in acl and write its name here if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( staff ) ) then setElementData(v,"Staff",true) else setElementData(v,"Staff",nil) end else setElementData(v,"Staff",nil) end end for _,v in pairs ( getElementsByType("player") ) do -- loop through all players Staff_check(v) -- call the function end addEventHandler("onPlayerLogin",root, function () Staff_check(source) end ) --- client side vuelo = false addCommandHandler("fly", function () if getElementData(localPlayer,"Staff") == true then if (vuelo == false) then vuelo = true setWorldSpecialPropertyEnabled("aircars", true) triggerServerEvent("onFly", getLocalPlayer()) else vuelo = false setWorldSpecialPropertyEnabled("aircars", false) triggerServerEvent("offFly", getLocalPlayer()) end end end)
  20. No one. Try at least and if you get stuck then we'll help.
  21. A custom function "findRotation" may come handy.
  22. Yes. There's no server side function for controlling ped. All you can do it search for animations and use them but you can only use animations, that's the best way.
  23. Dis code is a disaster. --client --[[ ************************************************************************************ I helped you with 2 function, make the rest by yourself. ;P + ************************************************************************************ ]] ped1 = false -- make the variable global local rx,ry,rz --- we make those variables local so we can use them for all functions inside this script addEvent("test1",true) addEventHandler("test1",getRootElement(), function(ped) ped1 = ped -- define it addEventHandler ( "onClientRender", getRootElement(), updateCamera ) -- add the event handler bindKey("space","down",sprintdown) bindKey("a","down",leftdown) end ) function updateCamera ( ) if isElement ( ped1 ) then -- make sure the ped exists local x, y, z = getElementPosition ( ped1 ) local px, py, pz = getElementPosition ( getLocalPlayer() ) setCameraMatrix ( px, py, pz+10, x, y, z ) setPedCameraRotation (ped1,getPedCameraRotation(getLocalPlayer())) end end function rightdown ( key,keyState ) if setPedControlState ( ped1, "right", false ) then --[[ this will prevent from bugging, you must use this for all controls and if you don't then you will see controls not working.]] rx,ry,rz=getElementRotation ( ped1 ) rz=rz-45 setPedControlState ( ped1, "right", true ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) end end function sprintup ( ) if setPedControlState ( ped1,"sprint",false )then setPedControlState ( ped1, "sprint", true) end end function renwuboom() unbindKey("g","down",renwuboom) setTimer ( playSound, 1000, 1, "sounds/daoshu321.wav" ) setTimer ( outputChatBox, 1000, 1, "人肉炸弹倒计时3" ) setTimer ( outputChatBox, 2000, 1, "人肉炸弹倒计时2") setTimer ( outputChatBox, 3000, 1, "人肉炸弹倒计时1" ) setTimer (function() triggerServerEvent("test2",getLocalPlayer(),getElementPosition ( ped1 )) playSound("sounds/boom.mp3") removeEventHandler("onClientRender", getRootElement(), updateCamera) fadeCamera(false,1.0,255,255,0) end,4000,1) setTimer ( fadeCamera, 5000, 1, true, 0.5 ) setTimer ( function() setCameraTarget(getLocalPlayer()) unbindKey("a","down",leftdown) unbindKey("a","up",leftup) unbindKey("d","down",rightdown) unbindKey("d","up",rightup) unbindKey("w","down",forwardsdown) unbindKey("w","up",forwardsup) unbindKey("s","down",backwardsdown) unbindKey("s","up",backwardsup) unbindKey("lshift","down",jumpdown) unbindKey("lshift","up",jumpup) unbindKey("space","down",sprintdown) unbindKey("space","up",sprintup) end, 6000, 1 ) end bindKey("g","down",renwuboom) bindKey("a","down",leftdown) bindKey("space","up",sprintup) end ) Btw I'll suggest you to use onClientKey. I don't have time to do this all for you so. ;p
  24. You can start a specific script from a specific resource but unloading the script won't be easy, you'll need to define functions and its a little complicated stuff so simply use startResource
×
×
  • Create New...