LilDawage Posted December 19, 2016 Share Posted December 19, 2016 (edited) function onColShapeHit ( player ) if ( player and isElement ( player ) and getElementType ( player ) == "player" and not isPedInVehicle ( player ) ) then local gang = exports.UGNGroups:getPlayerGroup ( player ) triggerClientEvent ( player, "UGNTurfs:onClientEnterTurfArea", player, turfLocs [ id ] ) if ( not gang ) then return exports.UGNMessages:sendClientMessage ( "You're not in a gang, you cannot turf.", player, 255, 255, 0 ) end local id = tonumber ( getElementData ( source, "UGNTurf:TurfId" ) ) if ( turfLocs[id].owner == gang ) then return end if ( turfLocs[id].attackers and turfLocs[id].attackers ~= gang ) then return exports.UGNMessages:sendClientMessage ( "The "..tostring(turfLocs[id].attackers).." gang is already trying to take this turf. Try again later.", player, 255, 0, 0 ) end if ( not turfLocs[id].attackers ) then exports.UGNMessages:sendClientMessage ( "You have started to prepare a turf war. Find cover, call backup, and wait for it to begin.", player, 255, 255, 0 ) local x, y, z = getElementPosition ( source ) exports.UGNGroups:outputGroupMessage ( getPlayerName ( player ).." is preparing a turf war with "..tostring(turfLocs[id].owner).." in "..getZoneName(x,y,z)..", "..getZoneName(x,y,z,true).."! Get there to help him, the war will start in 2 minutes!", gang, 255, 255, 0 ) setRadarAreaFlashing ( turfLocs[id].radar, true ) turfLocs[id].attackers = gang turfLocs[id].attackProg = 0 turfLocs[id].prepProg = 0 setElementData ( turfLocs[id].col, "UGNTurf:TurffingTable", turfLocs [ id ] ) end end end how to Put just Criminals Team can Turf here !! help guys Edited December 19, 2016 by NightStar 1 Link to comment
Captain Cody Posted December 19, 2016 Share Posted December 19, 2016 Put this in proper lua format and I'll help. Link to comment
LilDawage Posted December 19, 2016 Author Share Posted December 19, 2016 (edited) 4 minutes ago, CodyL said: Put this in proper lua format and I'll help. Function onColShapeHit ( player ) if ( player and isElement ( player ) and getElementType ( player ) == "player" and not isPedInVehicle ( player ) ) then local gang = exports.NGGroups:getPlayerGroup ( player ) triggerClientEvent ( player, "UGNTurfs:onClientEnterTurfArea", player, turfLocs [ id ] ) if ( not gang ) then return exports.NGMessages:sendClientMessage ( "You're not in a gang, you cannot turf.", player, 255, 255, 0 ) end local id = tonumber ( getElementData ( source, "UGNTurf:TurfId" ) ) if ( turfLocs[id].owner == gang ) then return end if ( turfLocs[id].attackers and turfLocs[id].attackers ~= gang ) then return exports.UGNMessages:sendClientMessage ( "The "..tostring(turfLocs[id].attackers).." gang is already trying to take this turf. Try again later.", player, 255, 0, 0 ) end if ( not turfLocs[id].attackers ) then exports.UGNMessages:sendClientMessage ( "You have started to prepare a turf war. Find cover, call backup, and wait for it to begin.", player, 255, 255, 0 ) local x, y, z = getElementPosition ( source ) exports.UGNGroups:outputGroupMessage ( getPlayerName ( player ).." is preparing a turf war with "..tostring(turfLocs[id].owner).." in "..getZoneName(x,y,z)..", "..getZoneName(x,y,z,true).."! Get there to help him, the war will start in 2 minutes!", gang, 255, 255, 0 ) setRadarAreaFlashing ( turfLocs[id].radar, true ) turfLocs[id].attackers = gang turfLocs[id].attackProg = 0 turfLocs[id].prepProg = 0 setElementData ( turfLocs[id].col, "UGNTurf:TurffingTable", turfLocs [ id ] ) end end end Edited December 19, 2016 by NightStar Link to comment
ViRuZGamiing Posted December 19, 2016 Share Posted December 19, 2016 (edited) if ( player and isElement ( player ) and getElementType ( player ) == "player" and not isPedInVehicle ( player ) and getTeamName(getPlayerTeam(player)) == "Criminals" ) then Edited December 19, 2016 by ViRuZGamiing Link to comment
LilDawage Posted December 20, 2016 Author Share Posted December 20, 2016 17 hours ago, ViRuZGamiing said: if ( player and isElement ( player ) and getElementType ( player ) == "player" and not isPedInVehicle ( player ) and getTeamName(getPlayerTeam(player)) == "Criminals" ) then thanks so much bro 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