Portside Posted March 6, 2014 Share Posted March 6, 2014 Sorry to ask, but can anyone write me up or give me a template for factions or a team with a timer, thanks. Link to comment
glowdemon1 Posted March 6, 2014 Share Posted March 6, 2014 local gate = createObject(objectID,x,y,z) if isPlayerInTeam(player,"theTeam") then moveObject(gate,1000,x,y,z) setTimer(function() moveObject(gate,1000,origX,origY,origZ),1000,1) end It's as simple as that. Link to comment
DNL291 Posted March 7, 2014 Share Posted March 7, 2014 @glowdemon1 Is missing an 'end' to close the setTimer function. And isPlayerInTeam isn't a MTA function, that code must have this function in order to be working. Link to comment
glowdemon1 Posted March 7, 2014 Share Posted March 7, 2014 @glowdemon1 Is missing an 'end' to close the setTimer function. And isPlayerInTeam isn't a MTA function, that code must have this function in order to be working. local gate = createObject(objectID,x,y,z) if (getPlayerTeam(player) == "theTeam") then moveObject(gate,1000,x,y,z) setTimer(function() moveObject(gate,1000,origX,origY,origZ) end,1000,1) end Oh, fixed been drifting off my attention lately Link to comment
Portside Posted March 7, 2014 Author Share Posted March 7, 2014 Do I just add; addCommandHandler under the set timer in order for the gate to open by a cmd? Link to comment
Moderators Citizen Posted March 7, 2014 Moderators Share Posted March 7, 2014 No. Lines 3 to 6 has to be in a function and the addCommandHandler will go under the end keyword of that function. Check this out: https://wiki.multitheftauto.com/wiki/Scr ... troduction Link to comment
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