-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
ooh, ya here: addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), function() samsphere = createColSphere(208.21,1980.58,28.89,300) samsphere1 = createColSphere(208.21,1980.58,28.89,1500) warningsphere = createColSphere(208.21,1980.58,28.89,500) samsite1 = createObject(3884,113.28,1814.28,32.45,0,0,309) samsite2 = createObject(3884,103.83,1901.12,32.45,0,0,309) samsite3 = createObject(3884,161.99,1933.18,32.45,0,0,145) samsite4 = createObject(3884,233.4,1934.85,32.45,0,0,145) samsite5 = createObject(3884,267.36,1895.48,32.45,0,0,145) samsite6 = createObject(3884,166.03,1850.09,32.45,0,0,350) samsite7 = createObject(3884,262.04,1807.5,32.45,0,0,37) end)
-
Can some1 help me this script, I get an error saying there's a bad argument @ 'addEventHandler'. Server-side only: addEventHandler("onColShapeHit", warningsphere, function(player) if (getElementType(player)) then local account = getPlayerAccount(player) local accountname = getAccountName(account) if getPlayerTeam(getTeamFromName("Military")) and isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Army" ) ) then outputChatBox("*RESTRICTED AREA*:Authorized to land at Area 69",player,0,0,255) else outputChatBox("*RESTRICTED AREA*:YOU ARE FLYING IN A NO FLY ZONE! TURN BACK!",255,0,0) end end end) addEventHandler("onColShapeHit", samsphere, function(player) if (getElementType(player)) then if getPlayerTeam(getTeamFromName("Military")) and isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Army" ) ) then outputChatBox("*RESTRICTED AREA*: Third Check, Welcome Back. ",player,0,0,255) else outputChatBox("*RESTRICTED AREA*:YOU ARE STILL FLYING IN A NO FLY ZONE! YOU WILL BE SHOT DOWN!",255,0,0) addEventHandler("onClientRender",getRootElement(),fireMissiles) outputChatBox("WARNING: SAMS HAVE BEEN FIRED NOW!",player,255,0,0) end end end) addEventHandler("onColShapeLeave", warningsphere, function(player) if (getElementType(player)) then if getPlayerTeam(getTeamFromName("Military")) and isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Army" ) ) then outputChatBox("*RESTRICTED AREA*: BYE! ",player,0,0,255) else outputChatBox("*RESTRICTED AREA*:GOOD CHOICE!",255,0,0) end end end) addEventHandler("onColShapeLeave", samsphere1, function(player) if (getElementType(player)) then if (missiles == true) then removeEventHandler("onClientRender",getRootElement(),fireMissiles) missiles = false end end end) addEventHandler("onColShapeLeave", samsphere, function(player) if (getElementType(player)) then if getPlayerTeam(getTeamFromName("Military")) and isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Army" ) ) then outputChatBox("*RESTRICTED AREA*: GET THEM! ",player,0,0,255) else outputChatBox("*RESTRICTED AREA*: SOOOOOOOOOOOOOOO LUCKY!",255,0,0) end end end)
-
Hey, I was looking for the gui stuff in client events on Wiki.
-
Well, he might have did what I told him...
-
Are you using the freeroam resource or the play resource? Those already have scripts for spawning and when somebody dies, they spawn in the same place in LV.
-
so when someone clicks on a vehicle then clicks on the button and it spawns the vehicle and closes the window? I suggest using the onClientGUIDoubleClick .
-
make an onPlayerWasted event/function.
-
It's either the connection, servers, or MTA... These are the only things that might do this.
-
what was the problem in custom.damage.xml?
-
that's a nice map... i think it might lag but it's worth it...
-
He is, because he uploaded a newer version in a different file name...
-
EDIT: NVM... you have to remove the space between "function" and "(startedresource)", even for the second addEventHandler "function" and "(attacker, etc.)". function(startedResource) -- and function(attacker, weapon, bodypart, loss) If the eventHandler is attached to the function never leave a space between the function and the brackets.
-
For the player to move the turrent is easy, when the player right click then you could use the setCameraMatrix and maybe setCameraTarget then to create a cross hair, use the dx draw and on player left click, set the cross hair to a new position... For the boxes, use setObjectStatic
-
Thanks, It works now... How do I put a space/break after each line? This is how it turned out to be:
-
Ur not annoying, your just new to this... SolidSnake is either having a bad day or just confused or maybe tired... I'll tell you something... The stuff the player carries are pickups(examples: weapons, health, etc.), the stuff you see like boxes or fences are objects in the game... SolidSnake should be sorry... Right?
-
Reasons: Video Card GTA MTA Got other things running (like youtube) Graphic Card
-
i'm having a problem with this script, can someone please help me... it's suppose to save the player or vehicle position... Server-Side only: addCommandHandler ( "save", function() -- if hasObjectPermissionTo ( source, "resource.save", false ) then if isPedInVehicle(source) then local vehicle = getPedOccupiedVehicle(source) local x, y, z = getElementPosition(vehicle) local model = getElementModel(vehicle) local rx, ry, rz = getElementRotation(source) local vehcode = model, x, y, z, rx, ry, rz outputChatBox ("Saved ",source) triggerEvent("vehicleSave",getRootElement(), vehcode) elseif (player) then local x, y, z = getElementPosition(source) local r = getPedRotation(source) local skin = getPedSkin(source) local int = getElementInerior(source) local dim = getElementDimension(source) local ped = x, y, z, r, skin, int, dim triggerEvent("savePlayer",getRootElement(), ped) end --[[ else outputChatBox("you aren'pt allowed to use this",source, end]] end) addCommandHandler("saveAV", -- save All Vehicles function() -- if hasObjectPermissionTo ( source, "resource.save", false ) then local vehicles = getElementsByType("vehicle") triggerEvent("AV",getRootElement(), vehicles) -- end end) addEvent("savePlayer",true) addEventHandler("savePlayer",getRootElement(), function(ped) local file = fileOpen("positions.txt") if not file then file = fileCreate("positions.txt") outputDebugString("Creating positions.txt") end if file then local time = getRealTime() fileSetPos(file,fileGetSize(file)) local written = fileWrite(file,ped) fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved to positions.txt",source) end else outputDebugString("Save: Cannot find or create positions.txt") end end) addEvent("vehicleSave",true) addEventHandler("vehicleSave",getRootElement(), function(vehcode) local file = fileOpen("positions.txt") if not file then file = fileCreate("positions.txt") outputDebugString("Creating positions.txt") end if file then local time = getRealTime() fileSetPos(file,fileGetSize(file)) local written = fileWrite(file,vehcode) fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved to positions.txt",source) end else outputDebugString("Save: Cannot find or create positions.txt") end end) addEvent("AV",true) addEventHandler("AV",getRootElement(), function(vehicles) local file = fileOpen("positions.txt") if not file then file = fileCreate("positions.txt") outputDebugString("Creating positions.txt") end if file then local time = getRealTime() fileSetPos(file,fileGetSize(file)) local written = fileWrite(file,vehicles) fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved to positions.txt",source) end else outputDebugString("Save: Cannot find or create positions.txt") end end)
-
Is it possible to move the map editor to the MTA SA Main Folder? It's hard to edit a map on another server of mines...
-
Why are you talking like that, I asked if it's suppose to delete the vehicle, I wanted to know more so I could help you with the script...
-
Can you add AI to keep watch of your hideout when gone
Jaysds1 replied to Peacekeeper's question in Client
I think you have to get mods to try to make an amusement park... And please don't double post... Use the edit button in the top-right corner of you post... thanks -
It might be the connection... He might be taking most of the connection which causes you to have less speed...
-
let me tell you guyz something, GTA:SA is the most popular because of the characters and the mapping... GTA:IV is popular for the graphics and it's more REAL-like... so really, if there planning to create an MTA:IV (up to 2-4 years ESTIMATED) it wont be popular and the next GTA is going to be out by then...
-
oK, First of all, you have to get the person name/nick and see if there in the acl group (example: Army) using is object in acl... and output or open a gui saying that the person is not in the Army... not that simple but easy.