-
Posts
2,753 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Captain Cody
-
Similar question asked a bit ago, only thing I can think of is it load a different txd / dff file if a person is in range of the gun. But that would replace all guns in range, other then that I'm not sure unless you were to attach a custom model to the persons hand when the gun is out and replacing the original gun with an invisible model, finding the object of the gun that the person is holding is near impossible, from what I know.
-
Make weapon invisible, then put another model to its place?
Captain Cody replied to KalashnikovZ's topic in Scripting
There was another page I was looking on that returned an object, I did the getPedWeapon off of memory and I thought that was the page I was looking at. I didn't recall correctly my mistake. I did something similar to making new custom weapons a while ago, I'll see if I still have that script. -
Make weapon invisible, then put another model to its place?
Captain Cody replied to KalashnikovZ's topic in Scripting
The getpedWeapon returns the weapon that is in his hand. Meaning it should allow him to set that transparent. -
https://wiki.multitheftauto.com/wiki/Se ... entVisible -- There's a few more parts to it, such as getting what component you are currently looking at and stuff such as that, but there's a base line for it. I started on a script like this a while back, never finished due to difficulty of getting the in camera stuff.
-
Make weapon invisible, then put another model to its place?
Captain Cody replied to KalashnikovZ's topic in Scripting
Oh btw it's giveWeapon, not givePedWeapon - Messed up a bit there, but to the point of what you just said, it should return the weapon that was given, if that does not work, use weapon = getPedWeapon(source) function customWep () giveWeapon (source,31,5000) local weapon = getPedWeapon(source) setElementAlpha(weapon, 0) local gunModel = createElement(object,'ModelId') -- ModelId = Find a unused Id and replace Dff, and TXD with gun model you want. -- attachElements ( gunModel, weapon) end - That should work, sorry about that, forgot about few things there. - -
Make weapon invisible, then put another model to its place?
Captain Cody replied to KalashnikovZ's topic in Scripting
function customWep () local weapon = givePedWeapon (source,31,5000) setElementAlpha(weapon, 0) local gunModel = createElement(object,'ModelId') -- ModelId = Find a unused Id and replace Dff, and TXD with gun model you want. -- attachElements ( gunModel, weapon) end -
Make weapon invisible, then put another model to its place?
Captain Cody replied to KalashnikovZ's topic in Scripting
Well what I ment when I said make weapon invsible, and put another model over it is, give the player a weapon, set it invisible, then attach an element to it. -
I'll be putting up test server tomorrow, when you join it will let you choose which mod to test.
-
Well assuming this is mySQL I do not know.
-
Set current weapon invisible, replace another unused object, attatch the object to the weapon in hand - New weapon model.
-
Insufficient privileges for the user.
-
Seams I have not had access to my laptop for a few days, just now got back. Script is 80% complete, since last time Not really interested in joining your community "For now", I'll post here a video of the script when it's done, if it turns out right, you two will have limited time offer of 5 dollars for the script, full support. --And about you using scripts, they are currently all for sale, https://forum.multitheftauto.com/viewtopic.php?f=108&t=95114 details and stuff, not really willing to give them out for free, they took a while to make. And atleast me spending months on them will not go down the drain and I can least make small profit off of them, if any one buys them.
-
List of scripts -- Car spawn script, allows you to add cars to map with command, and respawn only those cars with a command Pilot Job Bus Driver Job 'Only LS, can be moved or duplicated' Group System --Charge is nothing for this one, I just fixed some errors-- Mechanic job, in SF, as before can be moved or duplicated Medic job -- Actually not done if you want to finish it 50 cents -- Police job - Job markers are in major cities, more can be added - Taxi driver job Terrorist - Paid for killing Train script - Creates a train on the bridge out side of LV, quite complicated script here - Trucker job - Depo is in middle of map, when you get to loc you can continue or leave - Tune shop - Allows you to tune your car, drivetype, engine level, ride hight etc at a cost. Car shop system -Enter to buy a car, you can buy sell etc- Was working on restocker job never finished Help panel - Really basic one Fuel system - Turn off engine to refuel, stations located all around the map Custom rim pack - Consists of alot of old school rims. Save/Spawn system, when you first join it spawns you at a random airport, when you leave/reconnect it saves your weapons, health, armor, location, etc when you rejoin it gives you all that stuff and spawns you at last location. Alot more small stuff that pairs with the other scripts- -Was hoping to do a lot more stuff, but never got players on server, figured it was just a waste of time, if needed I can script for you 'For a pay'
-
I'll continue scripting the script tomorrow, after I figure out how to change camera when gun is aimed I'll be able to fly through the rest of the script.
-
Well everything from the server is for sale now.
-
Oh yeh well it's slowly coming along, I didn't make the whole script from the start, scripter I took over for on BoD started it, I'm still trying to figure out how to change camera when I aim the weapon. But as for that part, the weapon camera for the most part is set up. -May be a while though, lost the motivation to continue scripting anything, cannot get any players on server. Spent 5 months straight of scripting for nothing.
-
setElementData ( slothbot,key, value ,synchronize - True or False ) That's the correct format
-
Lemme finnish up what I'm doing now and I'll write a script for it. -- Yeah nvm to much stuff to do --
-
If you want the airplane to fly right, you can have it check the altitude every so often, if it gets to low aim it up, if it gets to high aim it down, stuff along the lines of that. btw put your code in [lua][./lua] brackets instead of [./code]
-
well in the trigger server side event you need to pass the vehicle, and in the client side you need to retrieve it in the function
-
where the hell is vehicle defined?
-
As for your script --Client mL1 = createMarker (2661.95, -1429.37, 29.49, "cylinder", 4, 238, 44, 44, 255) blipLS = createBlipAttachedTo (mL1, 51) addEventHandler( "onClientMarkerHit", mL1, function ( hitPlayer ) destroyElement(mL1) destroyElement(blipLS) triggerServerEvent("Pay", hitPlayer ) end ) mL2 = createMarker (-2642.98, 1371.07, 7.16, "cylinder", 4,238, 44, 44, 255) blipSF = createBlipAttachedTo (mL2, 51) addEventHandler( "onClientMarkerHit", mL2, function ( hitPlayer ) destroyElement(mL2) destroyElement(blipSF) triggerServerEvent("pay2", hitPlayer ) end ) mL3 = createMarker (1064.73, 2342.83, 9.82, "cylinder", 4, 238, 44, 44, 255) blipLV = createBlipAttachedTo (mL3, 51) addEventHandler( "onClientMarkerHit", mL3, function ( hitPlayer ) destroyElement(mL3) destroyElement(blipLV) triggerServerEvent("pay3", hitPlayer ) end ) --Btw Server side replace localPlayer or what not, with client --Server addEvent("Pay", true) addEventHandler("Pay", getRootElement(), function () givePlayerMoney(client, 5000) end) Try das, usually changing the cases of the letters works. And I removed some unneeded stuff, verifying if the marker you just hit is there??... -Edit, changed some more, should work..
-
Pay event does not need to be added client side. - And he's asking you to get another player to test with you, and you will see -- Have to deal with a lot of low English people --
-
I have no access to a server/computer currently, that I can do the pictures on. Fixed now, will add screens later you can request screen shots though or join the test server. --Edited