
Xeno
Members-
Posts
728 -
Joined
-
Last visited
Everything posted by Xeno
-
This ("_root") thing annoys me, I'm not sure how to solve it but try this: guiSetVisible(gui["_root"], false)
-
Oh yeah let's take a 3 minutes time to launch every damn rocket, such a great idea, mate. Oh, so I guess you would rather let people bind it to a button so they can run around shooting rockets everywhere and causing lag?
-
You DID claim it as your own or you wouldn't of posted it without saying "I didn't make this"
-
Use this: local theAccount=getPlayerAccount(player) if theAccount then local accountName=getAccountName(theAccount) if isObjectInACLGroup("user." .. accountName, aclGetGroup ( "Admin" ) ) then
-
You can tell its not him because the English is different in the --'s.... Lol.
-
Exploading someone: createExplosion addCommandHandler Gate: createObject moveObject addCommandHandler If you dont know what these mean, I would suggest following the tutorial on the Wiki, and just saying, no one is going to creat things for free for you, you need to learn how to do it yourself. Introduction to scripting:https://wiki.multitheftauto.com/wiki/Scripting_Introduction
-
I dont think its possible at the moment, but im not sure. GanJaRuleZ - NeX is not retarded, he knows how to play MTA.
-
Facepalm. scripting moving gates isnt hard. createObject moveObject onMarkerHit createMarker
-
Use destroyElement(markername)
-
Well in my opinion, there should be a gui you can choose the colour on before you actually launch the rocket.
-
I think he means that we should be able to choose the colour of the rockets before they take off.
-
Maybe its an MTA bug and it cant handle the amount of objects your replacing? I dont know really, just a guess.
-
You've not even explained whats wrong
-
No because the marker is inside the function.
-
function consoleShowMarker ( thePlayer, commandName ) if ( thePlayer ) then local theMarker = createMarker (X, Y, Z, "cylinder", 1.5, 255, 0, 0, 170 ) if ( theMarker ) then setTimer (destroyElement, 3000, 1, theMarker ) addEventHandler( "onMarkerHit", theMarker, MarkerHit ) end end end function teleportPlayerIfModSmodOrAdmin ( thePlayer ) if hasObjectPermissionTo ( player, "command.kick", false ) then setElementPosition ( thePlayer,X, Y,Z ) end end addCommandHandler ( "showadminmarker", consoleShowMarker ) Put the onMarkerHit inside the function with the marker in it. PS - There is no function called markerHit in your script, so that addEventHandler wont work. You only have functions called consoleShowMarker and teleportPlayerIfModSmodOrAdmin in your script.
-
Really ... i don't know . I sell scripts because i need money to buy a new server where everybody can play. It's a small investment. If i was you i would upload this script for free... Because it is simple. But yeah. That's just my opinion. I like the crosshair tho And now im gonna take s hit because i have to... If its so "simple" then why dont you go and script the same thing?
-
try just using onClientRender TAPL beat me to it , once again ;3
-
That looks pretty good :3^
-
I've never done it before, I was only correcting the other dudes script so that it wasnt on a timer.
-
function addASecond() local serial = getPlayerSerial(player) local oldData = executeSQLSelect( "TimePlayed", "TimePlayed","serial = '" .. serial .. "'") newData = tonumber(oldData[1]["TimePlayed"]) + 1 setElementData(alivePlayers[1],"TimePlayed",tonumber(getElementData(player,"TimePlayed"))+1) executeSQLUpdate ( "TimePlayed", "TimePlayed = '"..newData.."'","serial = '" .. serial .. "'") end end end addEventHandler ( "onClientRender", getRootElement(), addASecond) Use and onClientRender which will update the timer every second. If you use a setTimer it will lag the server because its being used a lot.
-
make all the tab panels like this local Tab1 = createTab... With the local at the beginning of them.
-
Window = {} TabPanel = {} Tab = {} Label = {} userPanelWindow = guiCreateWindow(98,223,436,291,"@@@@@@ UserPanel",false) TabPanel = guiCreateTabPanel(9,21,263,29,false,userPanelWindow) tab1 = guiCreateTab("User",TabPanel) tab2 = guiCreateTab("Crew",TabPanel) tab3 = guiCreateTab("Map",TabPanel) tab4 = guiCreateTab("@@@@@",TabPanel) tab5 = guiCreateTab("Credits",TabPanel) image1 = guiCreateStaticImage(224,56,201,197,"images/title.png",false,tab1) label1 = guiCreateLabel(11,69,189,17,"Name :",true,tab1) label2 = guiCreateLabel(10,95,167,17,"Total Wins :",true,tab1) label3 = guiCreateLabel(8,120,209,21,"Total Loses :",true,tab1) label4 = guiCreateLabel(10,256,418,17,"Serial :",true,tab1) label5 = guiCreateLabel(17,67,101,16,"@@@@@",true,tab2) label6 = guiCreateLabel(23,105,90,15,"@@@@@",true,tab2) label7 = guiCreateLabel(23,126,80,14,"@@@@@",true,tab2) label8 = guiCreateLabel(23,146,101,17,"@@@@@",true,tab2) label9 = guiCreateLabel(23,168,107,15,"@@@@@",true,tab2) label10 = guiCreateLabel(23,191,80,14,"@@@@@",true,tab2) label11 = guiCreateLabel(23,213,80,14,"@@@@@",true,tab2) label12 = guiCreateLabel(22,234,80,14,"@@@@@",true,tab2) label13 = guiCreateLabel(22,258,80,14,"@@@@",true,tab2) label14 = guiCreateLabel(177,69,82,16,"@@@@@",true,tab2) label15 = guiCreateLabel(170,99,85,17,"@@@@@",true,tab2) label16 = guiCreateLabel(328,71,93,17,"@@@@",true,tab2) label17 = guiCreateLabel(325,100,108,18,"@@@@@",true,tab2) label18 = guiCreateLabel(323,123,109,17,"@@@@@",true,tab2) function onresourceStart () bindKey ("F7", "down", showUserPanel) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function showUserPanel () getVisible = guiGetVisible (userPanelWindow) if (getVisible == true) then guiSetVisible (userPanelWindow, false) showCursor (false) end if (getVisible == false) then guiSetVisible (userPanelWindow, true) showCursor (true) local serial = getPlayerSerial(getLocalPlayer()) local wins = getElementData(getLocalPlayer(), "RaceWins") local loses = getElementData(getLocalPlayer(), "RaceLoses") local playerName = getPlayerName(getLocalPlayer()) if loses and wins then guiSetText ( label1, "Name: " .. playerName .. " " ) guiSetText ( label2, "Total Wins:" .. wins .. " " ) guiSetText ( label3, "Total Loses: " .. loses .. " " ) guiSetText ( label4, "Serial : " .. serial .. " " ) else guiSetText ( label2, "Total Wins: 0 " ) guiSetText ( label3, "Total Loses: 0 " ) end end end I changed source to getLocalPlayer()
-
No, you need to use getTeamFromName