
jomarisk8er
Members-
Posts
25 -
Joined
-
Last visited
Everything posted by jomarisk8er
-
oh thats why im asking.. i cant pass this lol
-
im using RP server, normal, im not doing any modes. i want to trigger it if the timer(not countdown) start, like, bankrobbery, theres a timer to rob right,
-
how dude, how to start
-
how to start racing?
-
they need to go in the marker so they can participate the racing, all on the markers will freeze and start countdown when the timer starts = /racetime like that
-
---client----- root = getRootElement() function Countdown (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/10.png",false) setTimer ( Countdown9, 1000, 1 ) outputChatBox ( "countdown started", root, 255, 255, 255, true ) end function Countdown9 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/9.png",false) setTimer ( Countdown8, 1000, 1 ) end function Countdown8 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/8.png",false) setTimer ( Countdown7, 1000, 1 ) end function Countdown7 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/7.png",false) setTimer ( Countdown6, 1000, 1 ) end function Countdown6 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/6.png",false) setTimer ( Countdown5, 1000, 1 ) end function Countdown5 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/5.png",false) setTimer ( Countdown4, 1000, 1 ) end function Countdown4 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/4.png",false) setTimer ( Countdown3, 1000, 1 ) end function Countdown3 (root ) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/3.png",false) setTimer ( Countdown2, 1000, 1 ) end function Countdown2 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/2.png",false) setTimer ( Countdown1, 1000, 1 ) end function Countdown1 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/1.png",false) setTimer ( Countdown0, 1000, 1 ) end function Countdown0 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,320,81,"images/go.png",false) setTimer ( CountdownEnd, 3000, 1 ) end function CountdownEnd (root) guiSetVisible ( imagecount, false ) end addEvent("startcountdown",true) addEventHandler("startcountdown",getRootElement(), Countdown) ----server---- racemarker = createMarker(-2663.51,610,13.3,"cylinder",20,0,255,0,100) function start(hitElement) if not isPedInVehicle(hitElement) then return end if (source == racemarker) then local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) triggerClientEvent(hitElement,"startcountdown",hitElement) setTimer(setElementFrozen,10000,1,vehicle,false) end end addCommandHandler("cd",start) i want to freeze all in the marker when timer starts or do a command
-
what should i change, i want to add command or timer for the race.. how? like if you type /racetime it will output how many time is remaining? lol sorry for too much question ..
-
racemarker = createMarker(-2663.51,610,13.3,"cylinder",20,0,255,0,100) function start(hitElement) if not isPedInVehicle(hitElement) then return end if (source == racemarker) then local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) triggerClientEvent(hitElement,"startcountdown",hitElement) setTimer(setElementFrozen,10000,1,vehicle,false) end end addCommandHandler("cd",start) like this? its not working.
-
oh its working, but how can i have a command for to start?, cause i want to set Timer, or Command to start the race.. how?
-
racemarker = createMarker(192,182,13,"cylinder",20,0,255,0,100) function start(hitElement) if (source == racemarker) then for i,vehicle in ipairs(getElementByType("vehicle")) do setElementFrozen(vehicle,true) triggerClientEvent("startcountdown",hitElement) setTimer(setElementFrozen,10000,1,vehicle,false) end end addEventHandler("onMarkerHit",racemarker,start) is that right?
-
---server--- function start(thePlayer) for i, vehicle in ipairs(getElementsByType("vehicle")) do setElementFrozen(vehicle, true) setElementFrozen(thePlayer,true) triggerClientEvent("startcountdown",getRootElement()) setTimer(setElementFrozen,10000,1,vehicle,false) setTimer(setElementFrozen,10000,1,thePlayer,false) end end addCommandHandler("countdown",start) ---client--- root = getRootElement() function Countdown (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/10.png",false) setTimer ( Countdown9, 1000, 1 ) outputChatBox ( "countdown started", root, 255, 255, 255, true ) end function Countdown9 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/9.png",false) setTimer ( Countdown8, 1000, 1 ) end function Countdown8 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/8.png",false) setTimer ( Countdown7, 1000, 1 ) end function Countdown7 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/7.png",false) setTimer ( Countdown6, 1000, 1 ) end function Countdown6 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/6.png",false) setTimer ( Countdown5, 1000, 1 ) end function Countdown5 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/5.png",false) setTimer ( Countdown4, 1000, 1 ) end function Countdown4 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/4.png",false) setTimer ( Countdown3, 1000, 1 ) end function Countdown3 (root ) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/3.png",false) setTimer ( Countdown2, 1000, 1 ) end function Countdown2 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/2.png",false) setTimer ( Countdown1, 1000, 1 ) end function Countdown1 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,110,190,"images/1.png",false) setTimer ( Countdown0, 1000, 1 ) end function Countdown0 (root) guiSetVisible ( imagecount, false ) imagecount = guiCreateStaticImage(305,119,320,81,"images/go.png",false) setTimer ( CountdownEnd, 3000, 1 ) end function CountdownEnd (root) guiSetVisible ( imagecount, false ) end addEvent("startcountdown",true) addEventHandler("startcountdown",getRootElement(), Countdown) how to freeze vehicle that only hit the marker? cause its freezing all the players in the server.. cause i want to make a race script, race participants should hit the marker to participate the race.. pls give me some tips..
-
oh sorry, im removing it cause for its much messy. sorry
-
-----client--- local robberHouses = { {240.7,-1377,52.2}; {192.2,-1307.8,69.3}; {210.6,-1237.8,77.3}; {237.6, -1200.7,75.1}; {316.6,-1138,80.5}; {434,-1136.8,72.7}; {485.3,-1155.2,70.6}; {485.1,-1116.8,81.3}; {561,-1111.4,61.8}; {566.5,-1099,68}; {610.6,-1083.2,57.8}; {647.1,-1057.7,51.5}; {671.1,-1019,54.7}; {743.4,-1006.9,51.7}; {785.4,-826.9,69.2}; {809.7,-758.7,75.5}; {849.6,-743.9,93.9}; {866.7,-710.3,104.6}; {895.2,-793.9,100.4}; {895.1,-645.3,115.9}; {952,-720.2,121.2}; {992.8,-697.6,120.6}; {977.6,-768.1,111.2}; {1047.6,-656.1,119.1}; {1094.9,-662.6,112.6}; {1016.9,-760.7,111.5}; {830.2,-923.5,54.2}; {1894.3,-1065.17,23.9}; {1893.1,-1070.6,23.9}; {1915.6,-1065,23.1}; {1935,-1071.7,23.4}; {1957.6,-1069.7,23.8}; {1959.2,-1102,25.75}; {1936.5,-1103.57,25.45}; {1925.4,-1101.5,25.07}; {1908.22,-1102.37,24.6}; {1997.76,-1103.29,25.78}; {2020.64,-1109.4,25.2}; {2033.74,-1112.4,24.7}; {2090.28,-1113.54,25.7}; {2105.83,-1142.86,24.58}; {2103,-1168.75,24.6}; {2104.2,-1188.47,25}; {2122.2,-1185.8,23}; {2031.6,-1043.16,24.2}; {2044.44,-1050.6,24.6}; {2059.4,-1056.44,25.65}; {2012.82,-967.22,41.46}; {2050.25,-954.7,47}; {2066.4,-992,47.7}; {2068,-959.8,51.87}; {2090.9,-973,50.9}; {2092.9,-1011.32,50}; {2123.4,-968,56.76}; {2130.4,-976.2,58.3}; {2177.1,-983,63.4}; {2205,989.38,62.9}; {2261,-1020.53,58.3}; {2155.8,-1071.8,38.7}; {2334.4,-1203,27}; {2334.7,-1233.7,27}; {2334.7,-1264.9,27}; {2404.16,-1281.7,24}; {2515.8,-1224.9,38}; {2558.2,-1210.4,53.5}; {2585.3,-1200.2,58.2}; {2682.6,-1200,65.7}; {2756.45,-1881.9,68.3}; {2780.25,-1340.7,29.6}; {2451.8,-1642.7,12.7}; {2512.7,-1651.13,12.9}; {2514.25,-1700.7,12.4}; {2455,-1709.2,12.6}; {2323.46,-1796.1,12.5}; {2342.1,-1895.25,12.6}; } function unpackRobberHouses () return unpack ( robberHouses [ math.random ( #robberHouses ) ] ) end local robberWindow = guiCreateWindow ( 0.314, 0.2513, 0.3809, 0.3893, "Robber Job GUI", true ) local robberLabel = guiCreateLabel ( 0.0193, 0.0736, 0.9903, 0.1104, "Robber Job", true, robberWindow ) guiLabelSetColor ( robberLabel, 255, 0, 0 ) guiLabelSetHorizontalAlign ( robberLabel, "center", false ) guiSetFont ( robberLabel, "default-bold-small" ) local robberInfoLabel = guiCreateLabel ( 0.0309, 0.2441, 0.944, 0.3077, "If you accept this job, you are able to rob houses. \nDrive to the blip created on your minimap (an house icon) Once you enter the marker\nyou will get paid.\nAnd another house will be able to be robbed.", true, robberWindow ) local robberAcceptButton = guiCreateButton ( 0.3533 ,0.7993, 0.1409, 0.1204, "Accept", true, robberWindow ) local robberCloseButton = guiCreateButton ( 0.5309, 0.7993, 0.1409, 0.1204, "Close", true, robberWindow ) guiSetVisible ( robberWindow, false ) function buttonClick ( button ) if ( button ~= "left" ) then return end if ( source == robberCloseButton ) then guiSetVisible ( robberWindow, false ) showCursor ( false ) elseif ( source == robberAcceptButton ) then destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerServerEvent ( "robberJobAccepted", localPlayer ) guiSetVisible ( robberWindow, false ) showCursor ( false ) triggerEvent ( "createHouseEvent", localPlayer ) outputChatBox ( "You are now employed as a Robber!" ) end end addEventHandler ( "onClientGUIClick", resourceRoot, buttonClick ) addEvent ( "createHouseEvent", true ) function createHouses () x, y, z = unpackRobberHouses () robhouseMarker = createMarker ( x, y, z, "cylinder", 1.5, 255, 0, 0, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end addEventHandler ( "createHouseEvent", root, createHouses ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( source == robhouseMarker and not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "givePlayerPay", localPlayer ) destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerEvent ( "createHouseEvent", localPlayer ) playSound ( "files/cash.mp3", false ) end end ) addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end ) function showRobberWindow() if (guiGetVisible(robberWindow)) then guiSetVisible (robberWindow, false) showCursor (false) else guiSetVisible (robberWindow, true) showCursor (true) end end addEvent ("showRobberWindow",true) addEventHandler ("showRobberWindow", root, showRobberWindow) addEventHandler("onClientGUIClick", Button, showRobberWindow) ---server--- robbermarker = createMarker(929.1,-919.87,41.6,"cylinder",1.5,255,0,0) robberjobblip = createBlipAttachedTo(robbermarker,41) setBlipVisibleDistance(robberjobblip, 300) function createRobberTeam () robberTeam = createTeam ( "Robber", 250, 0, 0 ) end addEventHandler ( "onResourceStart", resourceRoot, createRobberTeam ) addEvent ( "robberJobAccepted", true ) function givePlayerJob () setPlayerTeam ( source, robberTeam ) local paccount = getPlayerAccount ( source ) local skinid = getAccountData ( paccount , "boughtskin" ) if skinid then setElementModel ( source , tonumber ( skinid ) ) setPlayerNametagColor(source, 255,0,0) end end addEventHandler ( "robberJobAccepted", root, givePlayerJob ) function showGUI(hitElement) if (source == robbermarker) and (isPedInVehicle(hitElement) == false) then triggerClientEvent(hitElement,"showRobberWindow",hitElement) end end addEventHandler("onMarkerHit",resourceRoot,showGUI) addEvent ( "givePlayerPay", true ) function givePlayerRobPay () local wl = getPlayerWantedLevel(source) money = math.random ( 350, 1020 ) givePlayerMoney ( source, money ) setPlayerWantedLevel(source, wl+1) outputChatBox ( "You succesfully robbed the house and made $" ..money, source,0,255,0,false ) fadeCamera ( source, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, source, true, 1 ) end addEventHandler ( "givePlayerPay", root, givePlayerRobPay ) -how to get if theres a near cop, so whn i rob, i got 1 star when they point at me or looking at me.. pls help
-
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
thanks castillo it works. Edit: castillo, can i have request? can you put gang color so i can apply it in turfing system? .. pls -
3d Radio - attach the sound to the radio created.
jomarisk8er replied to jomarisk8er's topic in Scripting
i attached the radio to the vehicle, but the sound is staying at one place. and the sound is in client side -
---client---- sx,sy = guiGetScreenSize () local volume = 0.3 local guiShowing = false local currentPlaying = nil local state = nil musicPlayerGUI = {} width,height = 200,350 function createGui () musicPlayerGUI.window = guiCreateWindow(sx-width,sy/2-height/2,width,height,"Radio player",false) musicPlayerGUI.grid = guiCreateGridList(5,25,width-10,height-95,false,musicPlayerGUI.window) addEventHandler ( "onClientGUIDoubleClick", musicPlayerGUI.grid, onGuiClick, true ) -- klikanie w grid odpala radio stacje musicPlayerGUI.column = guiGridListAddColumn(musicPlayerGUI.grid,"Radio stations",0.9) musicPlayerGUI.button1 = guiCreateButton(10,height-65,25,20,">",false,musicPlayerGUI.window) addEventHandler ( "onClientGUIClick", musicPlayerGUI.button1, onGuiClick,true) musicPlayerGUI.button2 = guiCreateButton (40, height-65,25,20,"||",false,musicPlayerGUI.window) addEventHandler ( "onClientGUIClick", musicPlayerGUI.button2, onGuiClick, true ) musicPlayerGUI.button3 = guiCreateButton(70,height-65,60,20,"Play 3D",false,musicPlayerGUI.window) addEventHandler ( "onClientGUIClick", musicPlayerGUI.button3, onGuiClick, true ) musicPlayerGUI.button4 = guiCreateButton (135, height-65,60,20,"Close",false,musicPlayerGUI.window) addEventHandler ( "onClientGUIClick", musicPlayerGUI.button4, onGuiClick, true ) musicPlayerGUI.label = guiCreateLabel (5,height-45,width-10,20,"Volume",false,musicPlayerGUI.window) guiSetFont (musicPlayerGUI.label, "default-bold-small") guiLabelSetHorizontalAlign (musicPlayerGUI.label, "center") musicPlayerGUI.volumeBar = guiCreateScrollBar(5,height-30,width-10,20,true,false,musicPlayerGUI.window) guiScrollBarSetScrollPosition (musicPlayerGUI.volumeBar, volume*100) guiWindowSetMovable (musicPlayerGUI.window, false) guiWindowSetSizable (musicPlayerGUI.window, false) guiSetVisible (musicPlayerGUI.window, false) end stationsNames = {} stations = {} function showGui () if guiShowing then guiShowing = false guiSetVisible (musicPlayerGUI.window, false) showCursor (false) else guiShowing = true guiSetVisible (musicPlayerGUI.window, true) showCursor (true) end end addCommandHandler("radio",showGui) function onGuiClick (button, state, x,y) if source == musicPlayerGUI.button1 and state == "up" then --play button local selected = guiGridListGetSelectedItem (musicPlayerGUI.grid) if selected then local stationName = guiGridListGetItemText (musicPlayerGUI.grid, selected, musicPlayerGUI.column) if stationName then if currentPlaying then stopSound (currentPlaying) end currentPlaying = playSound (stations[stationName]) setSoundVolume (currentPlaying, volume) state = "play" else outputChatBox ("unknown error") end elseif state == "pause" and isSoundPaused(currentPlaying) then setSoundPaused (currentPlaying, false) end end if source == musicPlayerGUI.button2 and state == "up" then --pause button if isSoundPaused (currentPlaying) == false then setSoundPaused (currentPlaying, true) end end if source == musicPlayerGUI.button3 and state == "up" then -- 3d local selected = guiGridListGetSelectedItem (musicPlayerGUI.grid) if selected then local stationName = guiGridListGetItemText (musicPlayerGUI.grid, selected, musicPlayerGUI.column) if stationName then triggerServerEvent ("onClientRadioCreate", getLocalPlayer(), getLocalPlayer(), stationName) end end end if source == musicPlayerGUI.button4 and state == "up" then -- close showGui () end if source == musicPlayerGUI.grid and state == "up" then -- grid list click local selected = guiGridListGetSelectedItem (musicPlayerGUI.grid) if selected then local stationName = guiGridListGetItemText (musicPlayerGUI.grid, selected, musicPlayerGUI.column) if stationName then if currentPlaying then stopSound (currentPlaying) end currentPlaying = playSound (stations[stationName]) setSoundVolume (currentPlaying, volume) else outputChatBox ("unknown error") end end end end function OnScroll(Scrolled) if source == musicPlayerGUI.volumeBar then volume = guiScrollBarGetScrollPosition (source) / 100 if currentPlaying then setSoundVolume (currentPlaying, volume) end end end addEventHandler("onClientGUIScroll",getRootElement(),OnScroll) function onRadioCreate (x,y,z,path,source) local player = getElementPosition(source) local sound = playSound3D (path,x,y,z) setSoundVolume (sound, volume) setSoundMaxDistance (sound, 300) attachElements(sound,source) end addEvent ("onNewRadioCreate", true) addEventHandler ("onNewRadioCreate", getRootElement(), onRadioCreate) function onStart () triggerServerEvent ("requestForRadios", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) for k,v in ipairs(radia) do local sound = playSound3D (v[4], v[1], v[2], v[3]) setSoundVolume (sound, volume/100) setSoundMaxDistance (sound, 20) end stationsNames = names stations = st for k,v in ipairs(stationsNames) do local row = guiGridListAddRow ( musicPlayerGUI.grid ) guiGridListSetItemText ( musicPlayerGUI.grid, row, musicPlayerGUI.column, v, false, false ) end end addEvent ("sendAllRadios", true) addEventHandler ("sendAllRadios", getRootElement(), onJoin) createGui () ---server--- function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(angle+90) local plusX = math.cos(a) * dist local plusY = math.sin(a) * dist return x+plusX, y+plusY end xmlFile = xmlLoadFile ("radios.xml") radios = {} stations = {} stationsNames = {} function loadStations () if xmlFile then local children = xmlNodeGetChildren (xmlFile) for k,v in ipairs(children) do local radioTable = xmlNodeGetAttributes (v) for name,value in pairs(radioTable) do --outputChatBox (tostring(value)) if name == "name" then stationName = value elseif name == "path" then stationPath = value end end --outputChatBox ("name = " .. tostring(stationName) .. ", path = " .. tostring(stationPath)) stations[stationName] = stationPath table.insert (stationsNames, 1, stationName) end table.sort (stationsNames) end end loadStations () --stacje["kwejk"] = "http://fm.kwejk.pl/kwejkfm_aac.m3u" --stacje["zet"] = "http://www.radiozet.pl/content/stream/radiozet.pls" --stacje["rmf"] = "http://www.miastomuzyki.pl/odbior/rmf_aacp.pls" --stacje["rmf fm"] = "http://www.miastomuzyki.pl/odbior/rmf_aacp.pls" --nazwyStacji = {"kwejk", "zet", "rmf fm"} function createRadio (player,station) if station then local stationPath = stations[station] local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if stationPath then local x,y,z = getElementPosition( player ) local rx,ry,rz = getElementRotation ( player ) local newX, newY = getPointFromDistanceRotation (x,y, 1.5, rz) local playerveh = getPedOccupiedVehicle(player) local newZ = z - 1 local obiekt = createObject (2229, newX, newY, newZ, rx,ry,rz) attachElements (obiekt, playerveh,1, 0, 0,90,0) triggerClientEvent ("onNewRadioCreate", getRootElement(), newX, newY, newZ, stationPath) -- wysyla informacje do clientow o nowym radiu outputChatBox ("New station: " .. station .. " created, path: " .. tostring(stationPath), 0,220,0) table.insert (radios, 1, {newX, newY, newZ, stationPath}) -- zapisuje informacje o radiu dla nowych graczy else outputChatBox ("error", player, 220, 0, 0) --outputChatBox ("You choose wrong station, avaible stations:", player, 220, 0, 0) --for k,v in ipairs(stationsNames) do --outputChatBox ("-" .. v, player) --end end else outputChatBox ("error", player, 220, 0, 0) --outputChatBox ("Choose radio to create, avaible stations:", player,220,0,0) --for k,v in ipairs(stationsNames) do -- outputChatBox ("-" .. v, player) --end end end end addEvent ("onClientRadioCreate", true) addEventHandler ("onClientRadioCreate", getRootElement(), createRadio) --addCommandHandler ("radio", createRadio) function onJoin (player) if radios then triggerClientEvent (player, "sendAllRadios", getRootElement(), radios, stationsNames, stations) end end addEvent ("requestForRadios", true) addEventHandler ("requestForRadios", getRootElement(), onJoin) how to attach sounds to radio? the radio is staying at the place that the radio made .. bug .. pls someone help me?
-
Turfing System is good, for gangster. make a Radar = for Turf Places, and when a gang captured that turf, the radar color will change to their gang color, and when they die, they will spawn at theyre turfs when they die. When the turf captured by the gang, all gang members that is in the turf will get money for taking it.
-
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
hey kenix, can you help me for that script .. -
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
oh ok thanks any Flaker .. i will wait for castillo -
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
@flaker, still not working T_T , it doesnt send any message , even to me -
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
in description, you can see the exports. you can look if im right or wrong from defining it -
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
its not working T_T , it is exported from Castillo's gang system ... -
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
and there a problem again, it sending from all players T_T -
Group Chat - exported gang_system by castillo
jomarisk8er replied to jomarisk8er's topic in Scripting
Flaker, its working, but why its spamming like 5 times. -
function onChat(player,_,...) local msg = table.concat({...}, " ") local nick = getPlayerName(player) local r,g,b = getPlayerNametagColor(player) local vehicle = getPedOccupiedVehicle(player) local accName = getAccountName(getPlayerAccount(player)) local gang = exports.gang_system:getAccountGang(accName) local sendto = exports.gang_system:getGangMembers(gang) for seats,v in pairs(sendto) do if (isElement(v) and getElementType(v) == "player") then outputChatBox("#FF00FF(GC) "..(nick)..": #FFFFFF"..(msg).." ", v, r, g, b, true) end end end addCommandHandler("gc", onChat) this is my Code, its working when im typing /gc hello there. like that, cause i want to send the msg to all in my gang members, i dont know much in pairs,for,do thing pls help, IG : Tasyo