
TheNightRider
Members-
Posts
180 -
Joined
-
Last visited
Everything posted by TheNightRider
-
I would not advise anyone to attach a hunter to a hydra and hide the hunter by setting its alpha to 0 or something. It would come with its own problems. It would be a lot better to attach a RC instead even though as Castillo rightly said their fire power isn't as good as a mini-gun. I am thought of a much better idea, using the use of drawline or whatever to create a laser effect and set vehicle to blow when the line hits it. It could be done so the vehicle does not blow straight away so in other words use some type of time duration of the line hitting the target would probably do the trick. Could also set a timer so the laser pulses along with some sort of laser sound effect would do the trick i guess. I have not looked into it much as of yet but am sure its possible. It is a real shame MTA doesn't support attaching Ped weapons to vehicles if it did it would be more practictical and would by a perhaps would be better in performance
-
That's so funny what he wrote about how do you set timer to 5 mins lol answer is within the question lol
-
sure mate but i only want a minigun i did think of creating a ghost ped and give the ped a mini gun then it would be controlling that ped.
-
okay I understand shame cannot use a minigun and fire the rounds as it would normally
-
Okay so how could it be done?
-
Hi am trying to attach a minigun to a hydra am just wondering how would it be possible. The other thing is ive made a script which creates a hydra and a platform the platform does move an the hydra with it as 1 element. However I want the script to deattach after the platform as stopped moving. platform = createObject ( 3115,-1807.3857421875, 558.2412109375, 58.630416870117) Hydra = createVehicle (520, -1806.5009765625, 559.37109375, 60.620552062988, 0, 0, 300.44860839844) weapon = createObject( 362, 0,0,0) addEventHandler ( "onResourceStart", getRootElement(), onstartup ) addEvent ( "hit", true ) function hit ( pla, dim, hitElement ) if getElementType ( pla ) ~= "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then attachElements(Hydra, weapon, 0, 0, 4) attachElements(Hydra, platform, 0, 0, 2) moveObject (platform, 30000, -1807.3857421875, 558.2414109375, 233.22088623047) else outputChatBox ( "you don't have permisson to enter", pla, 255, 0, 0 ) end local vehicle = getPedOccupiedVehicle ( pla ) if vehicle then detachElements (Hydra, platform, 0, 0, 2 ) else return 0 end end end end addEventHandler ( "onColShapeHit", g_base_col, hit) addEventHandler ( "hit", g_root, hit)
-
Thanks man that works a treat I changed it from COP to LVPD cos i remembered that's the only police i have so far lol. Another issue i noticed players cannot get into passengers seat what could I do to allow them to enter vehicle as passenger but disallow them to enter drivers seat? PS could you explain the difference between using == and ~= ?
-
Okay but I didn't want it to restrict the Cops from driving other vehicles while their is no script in place to restrict them. Could you please show me where ive gone wrong on this small script? It should only allow police to drive police vehicles but not disallowing them to drive other vehicles. Could i add something to make the script ignore other vehicles which isn't in the array?
-
I have got it work however it only allows Cops to drive Police vehicles and nothing else lol Anyone got any idea's? local police = {[598]=true, [596]=true, [597]=true, [599]=true, [601]=true, [490]=true, [528]=true} function pAccess (thePlayer) if (police[getElementModel(source)]) and getTeamName(getPlayerTeam(thePlayer)) == "LVPD" then return 0 else cancelEvent() outputChatBox("you are not a Police officer", thePlayer) end end addEventHandler("onVehicleStartEnter",root,pAccess)
-
Thank you that makes a lot more sense
-
I don't want the script to work based on players skin otherwise i would of done that. The code itself is refering to team so it will only work for a team called COP And of course I use debugger lol what so of question is that? The debugger says unexpected symbol near then only line 16
-
Hey guys ive been trying to set vehicles to only take driver based on their team I though to do 1 team and then try to do different teams which are in my server. However I cannot get the function to work Could anyone give me some help please? This far as i got so far, function pAccess (thePlayer) if (police[getElementModel(source)]) and then Cop = getPlayerTeam ( thePlayer ), not ( thePlayer ) then cancelEvent() outputChatBox("you are not a Police officer", thePlayer) end end addEventHandler("onVehicleStartEnter",root,pAccess)
-
Sql as in for mysql? if so then no i don't and your right ive corrected that and now the script builds the tables but i want to set the correct settings for the table for each such as autoincrement, num, text etc. but idk how to do that part whatsoever
-
Thank you now it says error:call to none-running server resource (sql) string?? Forget to mention am on the MTA 1.2 and I don't know where on the site the patch is. if exports.sql:query_free( "UPDATE vehicles SET characterID = " .. -faction .. " WHERE vehicleID = " .. data.vehicleID ) then
-
Thanks for that I forgot to state its server in the meta.xml lol I was told in the past if you don't state which 1 it is it will become serverside any ways. What is the nightlies patch and do you know where I can get it from? I have a syntax error near 'fuel' but I cannot find it lol dbFree ( dbQuery ( server,"CREATE TABLE IF NOT EXISTS newTable ( vehicleID, model, posX, posY, posZ, rotX, rotY, rotZ, interior,respawnPosX, respawnPosY, respawnPosZ, respawnRotX, respawnRotY, respawnRotZ, respawnInterior, respawn, Dimension, numberplate, health, color1, color2, characterID, engineState, locked, lightsState, tintedWindows, fuel"))
-
Says page not found, error 404
-
Sorry doesn't work I didn't think it would.
-
Here:- local server = dbConnect( "sqlite", "Storedinfo.db" ) It is the correct name for the db file plus its in the same folder as the script.
-
Thank you but still get a nil value
-
I have had a look and ive tidied the script up however it still returns the connection has nil (false) could someone explain why this is happening? function( ) local server = dbConnect( "sqlite", "Storedinfo.db" ) local qh = dbQuery(server, "SELECT * FROM vehicles") local results = dbPoll( qh, -1 ) for key, value in pairs( results ) do dbFree ( dbQuery ( connection,"CREATE TABLE IF NOT EXISTS newTable ( vehicleID, model, posX, posY, posZ, rotX, rotY, rotZ, interior, dimension, respawnPosX, respawnPosY, respawnPosZ, respawnRotX, respawnRotY, respawnRotZ, respawnInterior, respawn, Dimension, numberplate, health, color1, color2, characterID, engineState, locked, lightsState, tintedWindows, fuel")) return end
-
Okay guys I will do and just thought I could use paradise as something to learn from. I'll check out the house_system see if that will help me better to direct my learning
-
So could I do it something like this?? function( ) local server = dbConnect( "sqlite", "Storedinfo.db" ) local qh = dbQuery(server, "SELECT * FROM vehicles") local results = dbPoll( qh, -1 ) for key, value in pairs( results ) do if server=false then dbFree ( dbQuery ( connection,"CREATE TABLE IF NOT EXISTS newTable ( { name = 'vehicleID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'model', type = 'int(10) unsigned' }, { name = 'posX', type = 'float' }, { name = 'posY', type = 'float' }, { name = 'posZ', type = 'float' }, { name = 'rotX', type = 'float' }, { name = 'rotY', type = 'float' }, { name = 'rotZ', type = 'float' }, { name = 'interior', type = 'tinyint(3) unsigned', default = 0 }, { name = 'dimension', type = 'int(10) unsigned', default = 0 }, { name = 'respawnPosX', type = 'float' }, { name = 'respawnPosY', type = 'float' }, { name = 'respawnPosZ', type = 'float' }, { name = 'respawnRotX', type = 'float' }, { name = 'respawnRotY', type = 'float' }, { name = 'respawnRotZ', type = 'float' }, { name = 'respawnInterior', type = 'int(10) unsigned', default = 0 }, { name = 'respawnDimension', type = 'int(10) unsigned', default = 0 }, { name = 'numberplate', type = 'varchar(8)' }, { name = 'health', type = 'int(10) unsigned', default = 1000 }, { name = 'color1', type = 'tinyint(3) unsigned', default = 0 }, { name = 'color2', type = 'tinyint(3) unsigned', default = 0 }, { name = 'characterID', type = 'int(11)', default = 0 }, { name = 'locked', type = 'tinyint(3) unsigned', default = 0 }, { name = 'engineState', type = 'tinyint(3) unsigned', default = 0 }, { name = 'lightsState', type = 'tinyint(3) unsigned', default = 0 }, { name = 'tintedWindows', type = 'tinyint(3) unsigned', default = 0 }, { name = 'fuel', type = 'float unsigned', default = 100 }, } )) then cancelEvent( ) return end
-
ok no worries that explains it can they still be used or is their an alternative?