Jump to content

waqaarali

Members
  • Posts

    181
  • Joined

  • Last visited

Everything posted by waqaarali

  1. Is there any free 24/7 host i can host my mta server because i really need one or i can pay with a phonecall if there is any cheap host, Please Help!
  2. Ok i will explain to you how i started to learn scripting firstly i read the MTA:SA Scripting Wiki, Read it like 10 times then i made a GUI Rules Panel which they show you how to make, this is important don't just copy it because then you don't learn from copying also it's not a developed script by you then. Once you have read Wiki and you understand it then go to forum.multitheftauto.com and go to the scripting section and find and useful basic scripts that you can learn of. Or you can find some scripts you can learn of at community.multitheftauto.com. Here is an example below of a script i made with Wiki and other script ideas! Note : This is one of my script also available on community! Client Side local testGrid = guiCreateGridList( 0.8, 0.6, 0.2, 0.03, true, testWindow ) -- guiCreateGridList( x axis, y axis, width, height, absolute/relative numbers, is it attached to something ) --right, lets make some labels that tell you a number of online players local testLabel = guiCreateLabel( 0.8, 0.6, 0.2, 0.04, 'Online Players: ', true, testWindow ) -- guiCreateLabel( x axis, y axis, width, height, name, absolute/relative numbers, attached to ) setTimer( -- lets create a timer function( ) -- timer needs a function guiSetText(testLabel, 'Online Players: '.. #getElementsByType('player')) -- set new text to stuff, for this instance to the label we created earlier end, 100, 0 -- lets end the function and set 100miliseconds to get the function executed, for infinity times ) -- lets close the timer Meta.xml type="script" decription="Online Players 1-100" name="Online Players" version="1.0" author="Gangsta"/> Ok this is a simple GUI script i had made my second script when i was new to scripting, it took me about approximatley 10-15 Minutes because i was new. Ok so here you go a simple start of scripting! Also still learning how to script btw not a pro yet! : D
  3. Ok so basically i started to script my first job and its a police job! Everything works fine no problems in /debugscript 3 neither console! Only thing is i created a marker but it don't appear? Can somone please help me this is urgent!!! Server Side createBlip ( 1565, -1676, 62, 30 ) function createPDTeam () PDteam = createTeam ("Los Santos Police", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createPDTeam) function joinPD() setPlayerTeam(source,PDteam) setElementModel(source, 280) giveWeapon ( source, 64, 2000 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "Los Santos Police", true ) outputChatBox("You are now part of LSPD!",source,0,255,0) end addEvent("setPD", true) addEventHandler("setPD",root,joinPD) function removePD() setPlayerTeam(source, 0) takeWeapon(source, 64) playeraccount = getPlayerAccount(source) if getAccountData(playeraccount, "standardskin") == 0 then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end outputChatBox("You are now an unemployed from this job.",source,255,0,0) end addEvent("removePD", true) addEventHandler("removePD",root,removePD) function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 6) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "Los Santos Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 10 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 10000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) Client Side local jobmarker = createMarker(1552.4996337891, -1677.3264160156, 15.1953125, "Cylinder", 1.5, 0, 0, 255, 150) GUIEditor = { memo = {}, button = {}, window = {}, } function guiMyCwindow() windowjob = guiCreateWindow(272, 191, 276, 291, "LS Police") guiSetVisible(windowjob, false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.78) GUIEditor.memo[1] = guiCreateMemo(9, 24, 258, 98, "Welcome to the Los Santos Police Department Job! Accept or Decline the job!\nAccept : Help the city survive from criminals!\nDecline: Bye! See You Soon!!", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(10, 240, 82, 35, "Accept", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(182, 240, 75, 35, "Decline", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(95, 225, 82, 23, "Quit Job", false, GUIEditor.window[20]) function PDjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end end ) addEventHandler("onClientMarkerHit", jobmarker, PDjob) function PDjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", jobmarker, PDjobleave) function joinTeam() triggerServerEvent("setPD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removePD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[11] , removeTeam, false) function removePDWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[11] , removePDWindow, false)
  4. If 1 guy goes on one server will they appear on other?
  5. And about that i opened all ports will it work now?
  6. I want to host 3 servers what 3 ports do i put it on ;(
  7. can you tell me step by step how to? I really want to!
  8. No i can do that i want 2 mta servers running at once
  9. i really need to know this is there any other way without buying dedicated server or anything host multiple mtaserver on one PC! Without another network!
  10. No another person who is currently working on a rpg server i want to help them!
  11. I am looking for a partner to help create an rpg server or a server to help reply to this message below if you are looking for help!
  12. I am looking for a partner to help create an rpg server or a server to help reply to this message below if you are looking for help!
  13. I need some scripters for free to help me develop a complete rpg gamemode! They will have Full FTP Access if they know what they are doing! RPG Gamemode : Scripts Developed : 0% Server Host : 24/7
  14. I can make gui's and a couple of real life scripts!
  15. Hello There! You need a hand in mta or a scripter/helper for your developing server contact me or reply to this post ! I am not a pro at scripting i am still learning yet but i can script ! So if you need a hand reply to this below!
  16. Hello There! You need a hand in mta or a scripter/helper for your developing server contact me or reply to this post ! I am not a pro at scripting i am still learning yet but i can script ! So if you need a hand reply to this below!
  17. Uhm.... dude i didn't say i was selling i said you can have and btw i never asked for money -.-
×
×
  • Create New...