Trevit Posted June 8, 2011 Posted June 8, 2011 Hi, Whenever I use this function, there are a "Network Trouble". I hope you can help me.
Trevit Posted June 8, 2011 Author Posted June 8, 2011 function startamap ( map ) if ( _G["Mapstate"] == "script started" ) then local res = getAll ( map, 'spawnpoint' ) if #getElementsByType( "player" ) <= #res then for i, point in pairs ( res ) do cars[i] = createVehicle ( point.model, point.px, point.py, point.pz, point.rx, point.ry, point.rz ) warpPedIntoVehicle ( getPlayerFromName( "Trevit" ), cars[i] ) -- there is only 1 car i've created end end end end
karlis Posted June 9, 2011 Posted June 9, 2011 _G will return nil if its not in the same resource use addEvent("onGamemodeMapStart",false) addEventHandler("onGamemodeMapStart",defineyourgamemodehere,function() --do what you want end) and is function getAll defined? also make sure mapmanager is on [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
UAEpro Posted June 9, 2011 Posted June 9, 2011 small question can i know what is _G ?? تيم سبيك بروجيمر ts3server://ts.pg.sa
Castillo Posted June 9, 2011 Posted June 9, 2011 This may tell you what it does: http://lua-users.org/wiki/CoreFunctionsTutorial San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
AGENT_STEELMEAT Posted June 9, 2011 Posted June 9, 2011 warpPedIntoVehicle was causing network trouble in a MTA 1.1 nightly a week or two ago, but it's been fixed. If you are using a 1.1 nightly, make sure it's the latest.
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