Jump to content

Resmurf

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by Resmurf

  1. Resmurf

    Colorblips

    Anyone knows how to??
  2. Resmurf

    Colorblips

    yes i removed and no errors or warning
  3. Resmurf

    Colorblips

    Not working, theres no blips on the map.
  4. Resmurf

    Colorblips

    get a error" 'then' expected near 'kw2'
  5. Resmurf

    Colorblips

    i wanna make blips for the team color root = getRootElement () color = { 0, 255, 0 } players = {} resourceRoot = getResourceRootElement ( getThisResource () ) function onResourceStart ( resource ) for id, player in ipairs( getElementsByType ( "player" ) ) do if ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] ) end end end function onPlayerSpawn ( spawnpoint ) if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end function onPlayerQuit () destroyBlipsAttachedTo ( source ) end function onPlayerWasted ( totalammo, killer, killerweapon ) destroyBlipsAttachedTo ( source ) end function setBlipsColor ( source, commandName, r, g, b ) if ( tonumber ( b ) ) then color = { tonumber ( r ), tonumber ( g ), tonumber ( b ) } for id, player in ipairs( getElementsByType ( "player" ) ) do destroyBlipsAttachedTo ( player ) if ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] ) end end end end function setBlipColor ( source, commandName, r, g, b ) if ( tonumber ( b ) ) then destroyBlipsAttachedTo ( source ) players[source] = { tonumber ( r ), tonumber ( g ), tonumber ( b ) } createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) end end addCommandHandler ( "setblipscolor", setBlipsColor ) addCommandHandler ( "setblipcolor", setBlipColor ) addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn ) addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerWasted", root, onPlayerWasted ) function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end where should i put this code local r,g,b = getTeamColor(getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam(player))
  6. What should i replace in the code?
  7. i would recommend u use doors by acl since if people not on a team (when they login) the gate will open saying unknown or u got to add the gate to not open to unknown teams.
  8. NVM fixed, i putted each gate on their respective map script folder.
  9. the door is duplicating ... i cant make 2 gates it glitches
  10. door = createObject (2990, -9.0146484375, 2066.83203125, 20.4453125, 0, 0, 90) myMarker = createMarker ( -17.3857421875, 2058.5, 19.626815795898, 'corona', 2.0, 0, 120, 225, 150 ) function markerHit (player) local theAccount = getPlayerAccount(player) if theAccount then local accountName = getAccountName(theAccount) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then moveObject ( door, 1500, -9.0146484375, 2056.33203125, 20.4453125 ) end end end addEventHandler ( "onMarkerHit", myMarker, markerHit ) function markerLeave (player) local theAccount = getPlayerAccount(player) if theAccount then local accountName = getAccountName(theAccount) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then moveObject ( door, 2990, -9.0146484375, 2066.83203125, 20.4453125 ) end end end addEventHandler ( "onMarkerLeave", myMarker, markerLeave ) Ok i did some research and i found this code, i replaced but didnt worked, the marker is on one side on top, cant it be invisible all around the door?
  11. i got that from the gatemaker, code is loong
  12. <gate x="-302.4921875" y="1507.392578125" z="78.181114196777" rx="0" ry="0" rz="0" x2="-302.4921875" y2="1507.392578125" z2="70.681114196777" rx2="0" ry2="0" rz2="0" objectID="2990" team="CIA" collisionx="-309.9990234375" collisionY="1501.8447265625" collisionZ="77.910583496094" collisionSize="13.5" raising="0" interiorID="0" /> should i put instead of team, aclgroup?
  13. Everything working good ^^ thanks
  14. ok markers = {} markers[1] = createMarker(-303.26, 1601.41, 1054.69, 'cylinder', 2.0, 0, 0, 255, 150) markers[2] = createMarker(88.91, 2081.20, 16.78, 'cylinder', 2.0, 0, 0, 255, 150) --marker ID, ACL name, Team name, Skin, Weapon, Ammo. teamACL = { [1] = {"CIA","CIA",164,3,700}, [2] = {"LVarmy","Military",287,3,700}, } function onMarkerHitSetTeam(hitPlayer,matchingDimension) for i,v in pairs(markers) do if (source == v) then if getElementType(hitPlayer) == "player" and matchingDimension then local account = getPlayerAccount(hitPlayer) if not account then return end local accountName = getAccountName(account) if isObjectInACLGroup("user."..accountName,aclGetGroup(teamACL[i][1])) then setPlayerTeam(hitPlayer, getTeamFromName(teamACL[i][2])) giveWeapon(hitPlayer,teamACL[i][4],teamACL[i][5],true) setElementModel(hitPlayer,teamACL[i][3]) end end end end end addEventHandler("onMarkerHit",getRootElement(),onMarkerHitSetTeam) function onMarkerHitSetTeam(hitPlayer,matchingDimension) for i,v in pairs(markers) do if (source == v) then if getElementType(hitPlayer) == "player" and matchingDimension then local account = getPlayerAccount(hitPlayer) if not account then return end local accountName = getAccountName(account) if isObjectInACLGroup("user."..accountName,aclGetGroup(teamACL[i][1])) then setPlayerTeam(hitPlayer, getTeamFromName(teamACL[i][2])) giveWeapon(hitPlayer,teamACL[i][4],teamACL[i][5],true) setElementModel(hitPlayer,teamACL[i][3]) end end end end end addEventHandler("onMarkerHit",getRootElement(),onMarkerHitSetTeam)
  15. if i put that then i will get a error in here setPlayerTeam(hitPlayer, getTeamFromName(teamACL[i][2]))
  16. i tried to do the same with army and dont work tell me whats wrong here please markers = {} markers[15] = createMarker(88.91, 2081.20, 16.78, 'cylinder', 2.0, 0, 0, 255, 150) --marker ID, ACL name, Team name, Skin, Weapon, Ammo. teamACL = { [15] = {"LVarmy","Military",287,3,700}, } function onMarkerHitSetTeam(hitPlayer,matchingDimension) for i,v in pairs(markers) do if (source == v) then if getElementType(hitPlayer) == "player" and matchingDimension then local account = getPlayerAccount(hitPlayer) if not account then return end local accountName = getAccountName(account) if isObjectInACLGroup("user."..accountName,aclGetGroup(teamACL[i][15])) then setPlayerTeam(hitPlayer, getTeamFromName(teamACL[i][16])) giveWeapon(hitPlayer,teamACL[i][18],teamACL[i][19],true) setElementModel(hitPlayer,teamACL[i][17]) end end end end end addEventHandler("onMarkerHit",getRootElement(),onMarkerHitSetTeam) i changed the numbers since they are already inuse with the CIA team error bad argument "aclgetgroup"
  17. works but it dont change team, but i think i can fix it i gotta change CIA team to teamcia rite?\ this is my team create teamcia = createTeam ( "CIA", 0, 0, 255 )
  18. teamACL means acl name? cause i get a error unfinished string. This dont even create the marker.
  19. local myMarker = createMarker( -303.26, 1601.41, 1054.69, 'cylinder', 2.0, 0, 0, 255, 150 ) function MarkerHit( hitElement, matchingDimension ) setElementModel(hitElement,164) giveWeapon ( hitElement, 3, 700, true ) setPlayerTeam ( hitElement, teamcia ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) I did this when players join the marker join a team, but how i do it for example, for acl group CIA please help, i want when player join the marker move to team, but only people on the acl group
  20. can you make it the marker a arrow to join and exit? that would be nicee cause here i tried and faild enterMarkerType = "corona" -- Default ( corona ) enterMarkerSize = 0.5 -- Default ( 0.5 ) enterMarkerColor = 255, 100, 255 -- Default ( 255,100,255 ) housesCanBuy = 2 -- You can chose 1 or 2, if u but 3,4,5... or 0 then script wont gonna work, dont tell i havent warn you. Default ( 1 ) i chaned the corona to arrow and i get a underground arrow lol
  21. not working check it again
  22. i want the first script, make when a user join the SERVER, MOVE to civilian team and i dont know why not working and the second script i dont know it spawn massive cars
×
×
  • Create New...