JR10 Posted September 23, 2011 Posted September 23, 2011 Not a new function. Cadu, I didn't notice your post.
Jaysds1 Posted September 27, 2011 Author Posted September 27, 2011 Hi everyone, I just want to know what's the best FPS Limit for GTA?
botanist Posted September 27, 2011 Posted September 27, 2011 Actually, that depends. For race I'd suggest 36, so other players won't have an advantage with a better pc (FPS difference really matters!), for deathmatch pretty much the same. Freeroam however, can easily be set to 100 indeed although I prefer 60 myself because this seems to be somewhat more stable.
shenglu Posted September 28, 2011 Posted September 28, 2011 Do not add no editing, not just copy and paste, if you look at it, you'll see the comments, edit it to check if the player is admin.
Jaysds1 Posted September 28, 2011 Author Posted September 28, 2011 thanks all, I have another problem, for the createRadarArea, How do I get the size?
Castillo Posted September 28, 2011 Posted September 28, 2011 The size is the one you wish it to be.... it's pretty much a stupid question, my opinion.
Jaysds1 Posted September 28, 2011 Author Posted September 28, 2011 The size is the one you wish it to be.... it's pretty much a stupid question, my opinion. No, I meant How do I get the size for radar x, and y?
Castillo Posted September 28, 2011 Posted September 28, 2011 That's not the SIZE, that's the POSITION, and you get it from getElementPosition function.
Jaysds1 Posted September 28, 2011 Author Posted September 28, 2011 That's not the SIZE, that's the POSITION, and you get it from getElementPosition function. ok, I'll try random numbers, BTW, I can't see the radar area on the radar, only on map
Castillo Posted September 28, 2011 Posted September 28, 2011 Maybe that's because you are creating it wrong. P.S: Random numbers ? that would make the radar area in nowhere......
Jaysds1 Posted September 28, 2011 Author Posted September 28, 2011 never mind, I got it now, but thanks Solid
Jaysds1 Posted September 28, 2011 Author Posted September 28, 2011 How do I make a map editor server?
Castillo Posted September 28, 2011 Posted September 28, 2011 Well, just start a normal server and put as starting game mode the map editor? which I think the main resource is "editor".
Jaysds1 Posted October 2, 2011 Author Posted October 2, 2011 Hi all, I was having a problem with this isInsideRadarArea function, Every time a person goes in the Col Shape, it's suppose to check if the player is inside a Radar Area, but it says that there's a nil for argument 1 which is the radar area: createRadarArea(2428.345703125,-1628.1298828125,200,-110,0,255,0,100) createColRectangle(2444.5830078125,-1719.29296875, 190,105) addEventHandler("onClientColShapeHit",getRootElement(), function(theElement,theArea,matchingDimension) if (theElement == getLocalPlayer()) and (matchingDimension == 0) then if (getPlayerTeam(theElement) == getTeamFromName("Grove Street Famillies") or getTeamFromName("Ballas") or getTeamFromName("Varous Los Aztecas") or getTeamFromName("Los Santos Vagos")) then x,y = getElementPosition(theElement) if (isInsideRadarArea(theArea,x,y) == true) then r,g,b = getTeamColor(getPlayerTeam(theElement)) rr,gg,bb = getRadarAreaColor(theArea) if (r == rr and g == gg and b == bb) then outputChatBox("*TURF*: You entered your gangs territory.",r,g,b) else outputChatBox("*TURF*: YOU HAVE ENTERED ANOTHER GANGS TERRITORY, STAY IN THIS TERITORY FOR 22 SECONDS OR KILL A GANG MEMBER TO TRIGGER A WAR!",255,0,0) triggerEvent("war",getLocalPlayer()) end end elseif (getPlayerTeam(theElement) == getTeamFromName("Los Santos Police Department")) then outputChatBox("*TURF*: YOU HAVE ENTERED A GANGS TERRITORY, IT MIGHT BE UNDER WAR",100,0,0) end end end)
Castillo Posted October 2, 2011 Posted October 2, 2011 That's because it's nil. onClientColShapeHit doesn't return the radar area, because that's not possible, a col shape and a radar area are two different things.
Jaysds1 Posted October 2, 2011 Author Posted October 2, 2011 thanks for telling me that, I'll try figuring another way.
Jaysds1 Posted October 6, 2011 Author Posted October 6, 2011 hi all, I want to know how to update this label, When the cars are respawning this label comes up and shows how much seconds is left to respawn all the vehicles but the seconds don't get updated: -- Server-side function respawn(command) outputChatBox("RESPAWNING ALL UNOCCUPIED VEHICLES IN 30Secs") outputDebugString("Cars Respawning") rspwn = setTimer(function () local vehicles = getElementsByType ( "vehicle" ) -- Return all the vehicles in a table for k, vehicle in ipairs ( vehicles ) do -- For every vehicle do the following... if isEmpty( vehicle ) then local seats = getVehicleMaxPassengers(vehicle) resetVehicleIdleTime ( vehicle ) -- Reset the vehicle's idle time respawnVehicle ( vehicle ) end end outputDebugString("Cars Respawned") outputChatBox("ALL UNOCCUPIED VEHICLES RESPAWNED") triggerClientEvent("r_close",getRootElement()) end,30000, 1) remaining = getTimerDetails(rspwn) triggerClientEvent("r_open",getRootElement(),remaining) if (command) then resetTimer(auto) outputDebugString("Timer Reset") end end -- Client-side addEvent("r_open",true) addEventHandler("r_open",getRootElement(),function(remaining) rlbl = guiCreateLabel(13,572,106,15,"Respawning cars in: ",false) guiSetAlpha(rlbl,1) rlbl2 = guiCreateLabel(123,572,25,15,tostring(remaining),false) guiSetAlpha(rlbl2,1) end) addEvent("r_close",true) addEventHandler("r_close",getRootElement(),function() destroyElement(rlbl) destroyElement(rlbl2) end)
Castillo Posted October 6, 2011 Posted October 6, 2011 -- Server-side function respawn(command) outputChatBox("RESPAWNING ALL UNOCCUPIED VEHICLES IN 30Secs") outputDebugString("Cars Respawning") rspwn = setTimer(function () local vehicles = getElementsByType ( "vehicle" ) -- Return all the vehicles in a table for k, vehicle in ipairs ( vehicles ) do -- For every vehicle do the following... if isEmpty( vehicle ) then local seats = getVehicleMaxPassengers(vehicle) resetVehicleIdleTime ( vehicle ) -- Reset the vehicle's idle time respawnVehicle ( vehicle ) end end outputDebugString("Cars Respawned") outputChatBox("ALL UNOCCUPIED VEHICLES RESPAWNED") triggerClientEvent("r_close",getRootElement()) end,30000,1) triggerClientEvent("r_open",getRootElement(),remaining) update = setTimer(function () remaining = getTimerDetails(rspwn) triggerClientEvent("r_open",getRootElement(),remaining) end, 1000, 30) if (command) then resetTimer(rspwn) resetTimer(update) outputDebugString("Timer Reset") end end -- Client-side addEvent("r_open",true) addEventHandler("r_open",getRootElement(), function(remaining) if isElement(rlbl) and isElement(rlbl2) then guiSetText(rlbl2,tostring(remaining)) else rlbl = guiCreateLabel(13,572,106,15,"Respawning cars in: ",false) rlbl2 = guiCreateLabel(123,572,25,15,tostring(remaining),false) guiSetAlpha(rlbl,1) guiSetAlpha(rlbl2,1) end end) addEvent("r_close",true) addEventHandler("r_close",getRootElement(), function() if isElement(rlbl) and isElement(rlbl2) then destroyElement(rlbl) destroyElement(rlbl2) end end) Try it, I'm not sure if it'll work, the code is a bit messed.
Jaysds1 Posted October 10, 2011 Author Posted October 10, 2011 Hi all, I was having a problem with my script for the past few days, When the player kills the ped, there suppose to warp to another Position, but After the player kills the ped an error message comes up and they don't move anywhere: t1 = createPed(23,-3666.6447753906,-2015.8166503906,11.793441772461,124.23803710938,true) setElementFrozen(t1,true) addEventHandler("onPedWasted",getRootElement(), function(killer) if (getElementModel(source) == 23) if (getElementType(killer) == "player") then if (source == t1) then outputChatBox("",killer,100,0,0) t2 = createPed(23,-3660.0227050781,-2013.6018066406,9.9486846923828,124.23803710938,true) setElementFrozen(t2,true) elseif (source == t2) then outputChatBox("",killer,137,0,0) t3 = createPed(23,-3652.7902832031,-2014.0773925781,8.7459049224854,124.23803710938,true) setElementFrozen(t3,true) elseif (source == t3) then outputChatBox("",killer,137,0,0) triggerEvent("finish1",killer) setTimer(outputChatBox,7000,1,"",killer,137,0,0) t4 = createPed(23,-3609.2392578125,-2068.7431640625,6.6531052589417,118.68984985352,true) elseif (source == t4) then outputChatBox("",137,0,0) t5 = createPed(23,-3600.7316894531,-2065.0659179688,6.3656249046326,123.07897949219,true) elseif (source == t5) then outputChatBox("",137,0,0) t6 = createPed(23,-3590.8957519531,-2061.6762695313,6.3656249046326,126.83633422852,true) elseif (source == t6) then outputChatBox("",137,0,0) t7 = createPed(23,-3585.2629394531,-2059.3198242188,6.2059550285339,122.42526245117,true) elseif (source == t7) then outputChatBox("",killer,137,0,0) triggerEvent("finish2",killer) setTimer(outputChatBox,7000,1,"",killer,137,0,0) end end end end)
Jaysds1 Posted October 10, 2011 Author Posted October 10, 2011 So, put the the peds in the table and if they die, How could the event trigger for the source which is the killer?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now