Jump to content

BroadOne

Members
  • Posts

    13
  • Joined

  • Last visited

Details

  • Location
    United Kingdom
  • Occupation
    MTA Hosting

BroadOne's Achievements

Square

Square (6/54)

0

Reputation

  1. Guessing it's a marker the vehicle enters, you will simply need to edit this part of the script. I would make an if statement, and like you said get the player team or some data from the player depending on how factions are saved on your server. Give it a try and post back if you have a problem with it, also remember to post any code you have edited and any debug errors if there are any.
  2. Sorry this promotion has now expired! Check the BroadOne website for more offers. Merry Christmas
  3. We can help you easier if you submit the code that is not working. Also have you checked the debug for errors?
  4. BroadOne

    HELP

    You will need to rewrite it. You could also host the MySQL database on your server and just connect it, probably your only solution.
  5. BroadOne

    Editor

    To run 2 servers all you need to do is copy your server files to a new folder, change the ports that MTA uses in the server config and run them both. You can connect to the other server by connecting to YOURIP:YOURPORTS If you want both servers to be exactly the same, you can create a job to copy the files from one server to another ignoring the config files so the ports aren't overwritten. Not elegant, but a solution.
  6. If you don't know how to code look at the community resources, there are plenty you can use as a template for your own or to learn from.
  7. BroadOne

    Editor

    Run 2 servers, one for development and another for live. I know this isn't the answer to the question you asked but just a suggestion, also if you only have one server you can change the ports and run 2 MTA Servers on one server. But to answer your original question, yes it is possible but you will need to edit the Editor gamemode, and to be honest it seems like too much hassle than it's really worth.
  8. I haven't looked at the script properly and don't have time to try it now but there was too many "end"'s, you should use a decent editor like notepad++ and select the language Lua. It will show you mistakes like that. Give it a try not sure if it will work though. ------->> -- GUI ------->> --Window local sWidth,sHeight = guiGetScreenSize() local Width,Height = 600,500 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) windowJobStats = guiCreateWindow(X,Y,Width,Height,"Police chief",false) guiWindowSetSizable(windowJobStats,false) guiWindowSetMovable(windowJobStats,false) grid = guiCreateGridList(9,30,183,375,false,windowJobStats) guiGridListSetSelectionMode(grid,1) guiGridListAddColumn(grid, "Player", 30) edit = guiCreateEdit(9,406,180,30,"",false,windowJobStats) sackbutton = guiCreateButton(450,33,100,34,"Sack Selected",false,windowJobStats) unsackbutton = guiCreateButton(450,79,100,34,"Unsack Selected",false,windowJobStats) placeAPBbutton = guiCreateButton(450,125,100,34,"Place APB",false,windowJobStats) gochiefbtton = guiCreateButton(450,174,100,34,"/GoChief",false,windowJobStats) closebutton = guiCreateButton(500,450,50,50,"X",false,windowJobStats) guiSetVisible(windowJobStats,false) --[[ Create a function to handle toggling of PC GUI ]]-- function CloseWindowSet () if guiGetVisible(windowJobStats) ~= true then guiSetVisible (windowJobStats, true ) showCursor ( true ) guiSetInputEnabled( true ) putAllPlayersInList() else showCursor ( false ) guiSetVisible (windowJobStats,false) guiSetInputEnabled( false) outputChatBox("You are not a Police Chief", 255, 255, 255) end end addCommandHandler("pcpanel", CloseWindowSet) function putAllPlayersInList() guiGridListClear(grid) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) guiGridListSetItemColor(grid,row,1,0,255,0) end end function closeGUI( button, state ) if source ~= windowJobStats then if button == "left" and state == "up" then guiSetVisible( windowJobStats, false ) showCursor ( false ) end end end addEventHandler( "onClientGUIClick", closebutton, closeGUI ) addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local text = guiGridListGetItemText(grid,sel,1) if ( source == unsack ) then -- Unsack if ( sel ~= -1 ) then triggerServerEvent("unsackplr",localPlayer,text) end elseif ( source == placeAPBbutton ) then --- APB if ( sel ~= -1 ) then triggerServerEvent("onDes",localPlayer,text) end elseif ( source == gochiefbtton ) then -- chief if ( sel ~= -1 ) then triggerServerEvent("setteam",localPlayer,text) end end end )
  9. BroadOne

    Events

    Not for the bullet AFAIK. Sorry.
  10. BroadOne

    Login

    When you post it's always good to post the error from the debug console? Thanks.
  11. You can either learn how to script or use the resources on the community I suppose, but servers that are created by hand are always of some better quality than one that is from old resources.
  12. Hey vinigas, Here is a quick script guide: To create a new script simply make a directory (a folder) in your Resources folder I'm going to call mine MyCoolScript All scripts need a meta.xml file to know where all the files in the script are, also in the meta.xml file you can add lots of other things too. meta.xml on the wiki: https://wiki.multitheftauto.com/wiki/Meta.xml So make a file in the MyCoolScript folder called meta.xml and inside it should look like this (basic): In the same directory (MyCoolScript) create 2 scripts, one called myserverscript.lua and myclientscript.lua Then my myserverscript.lua you can use server functions and events, and in myclientscript.lua you can use client functions and events. You can communicate between client and server scripts using triggerClientEvent and same to the server script by triggerServerEvent If you copy the client and server code from here https://wiki.multitheftauto.com/wiki/TriggerClientEvent and put it in the myserverscript.lua and in the myclientscript.lua that is a basic script made. Hope this was easy enough to follow and all correct, I would suggest looking around the wiki more it is all there and will help you a lot. Good Luck.
  13. Https://broadone.co.uk Here is our Basic package for £15/month or just £12.50 if you pay yearly and what you get; Basic Package Guaranteed RAM: 1GB Burst: 1GB Total RAM: 2GB (We do not oversell!) 1 IP Address Bandwidth: Unlimited HDD Data: 25GB Player slots are not capped and you can set them yourself. We also have smaller servers starting at just £5 When your server is purchased you receive your control panel to start/stop or reinstall your server, there is a guide on getting your MTA Server setup and ready to go, it will only take 15 minutes to have a fully operational server running! DDoS Protection included by default! Find out more about our DDoS Protection here:https://broadone.co.uk/ddos.php. Any questions, for the fastest reply just create a support ticket or else post back here. You will find the install guide for MTA-SA in our knowledge base, but if you can't install it we will be happy to help. Thank you. Liam
×
×
  • Create New...