-
Posts
865 -
Joined
-
Last visited
Everything posted by Callum
-
To place something in the middle of the screen I usually do something like; local resX,resY = guiGetScreenSize() guiCreateWindow(resX/10*4,resY/10*3.5,resX/10*2,resY/10*3,"A window",false)
-
What about toggleControl? You can set fire and aim_weapon to false.
-
Download Click here! Introduction I noticed the helpmanager resource was very awkward as it only made 1 tab per resource with a help.xml and was quite a long client-side code, so I tried making my own shorter, and more flexible version of it. The result is quite good, it's only a short client-side file plus the xml files you add. And it's quite easy to add new tabs/text. How to use 1. Add an XML file inside the infoGUI resource (it can be called whatever you like). 2. Go into meta.xml and insert a line as follows (where nameHere.xml = your file name); 3. Go into info-client.lua and at the root of the script you will see a table, insert at the end the following; "nameHere.xml;tabName" - of coruse nameHere.xml is the XML file, use a ; to seperate it, and then what you wish to name the tab. 4. Go into the XML file, and put at the root of the script a node, e.g.; 5. In between the nodes type your text. If you still don't understand the resource comes with rules.xml and commands.xml as an example.
-
That event is not being triggered (I presume) so the function won't ever do anything. onPlayerWasted you could check how many players remain alive, if 1, then triggerEvent("onPlayerDestructionDerbyWin",winner,winner) (or the client-side equivalent).
-
After line 14 insert a new line and add "end".
-
To make it work with zombies use what you've done with players on peds also, but the zombie script will probably ignore the green zone's effect.
-
There should be a removeGTAObject(objectID) and every GTA SA object has a unique ID.
-
Read it again, that's the most in-depth and detailed version of a how-to you could possibly get.
-
"This video has been removed by the user."
-
Presuming you have a ped defined as "ped", the script below should work (client-side): function invPed() cancelEvent() end addEventHandler("onClientPedDamage",ped,invPed)
-
Do you get any errors? Check by typing "/debugscript 3" in-game. Also, on the event handler I recommend you change getRootElement() to getResourceRootElement()
-
local x,y,z = getElementPosition(theObject) Replace theObject with your objects variable. Or just try checking in a .map file for it, if it already exists at start.
-
Yes, like JBoy said, type /debugscript 3, then tell us what error it returns.
-
So this can't be publicly released for what reason? Would it allow people to make a work-around or something?
-
In the meta.xml shouldn't have a type arg. It should only have an src arg. So
-
Please understand that you can't just ask for a script to be made for you, don't you think we have better things to do in our time? You'll have to do it yourself, we can help you with some parts of it, but we won't do it for you. Refer to the wiki for more information on scripts and scripting.
-
local blueMarker = createMarker ( 4000, -460, 25, "corona", 3, 0, 0, 255, 255 ) local redMarker = createMarker ( 4040, -460, 25, "corona", 3, 255, 0, 0, 255 ) function onHit(hitElement) if (source == blueMarker) then setPedGravity(hitElement,0.008) end if (source == redMarker) then setPedGravity(hitElement,0.004) end end addEventHandler("onMarkerHit",getRootElement(),onHit)
-
resetMapInfo ?
-
wtf you on about? place the house really high.
-
[SOLVED] [setCameraInterior()]/[mystery ped] issue
Callum replied to BladeArtist's topic in Scripting
There is nothing wrong with peds at 0,0,0, it must be your script. But as a player spawns for a split-second they are located at 0,0,0.Try turning off every resource exept admin, runcode, and play. EDIT: Mr.Hankey beat me to it -
Are you still running it as administrator because if "memory could not be read" it sounds like the kind of thing that requires administrative rights.
-
Like Tim said, read the wiki (link on his post). If you don't get it, read it again! And you can't expect to get it right first time, Do some trial and error. Everybody has this problem with starting to learn lua, you've got to get used to it before things start working.