HoLsTeN Posted January 31, 2011 Share Posted January 31, 2011 Hi all i make script for CounteR Strike Radio it is work good but the Problem it is Players repeat votes and the server very Noise i want any one help me in this 2 things : 1- The player can in 1 minute play Only 1 command in the Radio 2- just player team can Hear the sound and this is my code cilent side GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(345,168,342,446,"CounteR Strike Script By HoLsTeN 1.0",false) guiSetVisible(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,324,417,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("CounteR Strike",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(7,147,95,32,"Follow Me",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(7,191,95,32,"Cover Me",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(7,235,95,32,"storm front",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(7,280,95,32,"Taking Fire",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(7,326,95,32,"Hold this Position",false,GUIEditor_Tab[1]) GUIEditor_Button[6] = guiCreateButton(113,147,95,32,"Regroup Team",false,GUIEditor_Tab[1]) GUIEditor_Button[7] = guiCreateButton(114,191,95,32,"Go Go Go",false,GUIEditor_Tab[1]) GUIEditor_Button[8] = guiCreateButton(116,235,95,32,"Fall Back",false,GUIEditor_Tab[1]) GUIEditor_Button[9] = guiCreateButton(117,280,95,32,"stick Togeher Team",false,GUIEditor_Tab[1]) GUIEditor_Button[10] = guiCreateButton(118,326,95,32,"Need Backup",false,GUIEditor_Tab[1]) GUIEditor_Button[11] = guiCreateButton(219,147,95,32,"Roger That",false,GUIEditor_Tab[1]) GUIEditor_Button[12] = guiCreateButton(221,191,95,32,"Negative",false,GUIEditor_Tab[1]) GUIEditor_Button[13] = guiCreateButton(220,235,95,32,"Report In",false,GUIEditor_Tab[1]) GUIEditor_Button[14] = guiCreateButton(221,280,95,32,"I'm in Position",false,GUIEditor_Tab[1]) GUIEditor_Button[15] = guiCreateButton(221,326,95,32,"Sector Clear",false,GUIEditor_Tab[1]) GUIEditor_Image[1] = guiCreateStaticImage(4,7,314,138,"11.png",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(12,370,308,19,"Just click on the button 1 time By HoLsTeN Have Fun",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ("followme1", getLocalPlayer()) elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("ct_coverme1", getLocalPlayer()) elseif (source == GUIEditor_Button[3]) then triggerServerEvent ("stormfront1", getLocalPlayer()) elseif (source == GUIEditor_Button[4]) then triggerServerEvent ("fireassis1", getLocalPlayer()) elseif (source == GUIEditor_Button[5]) then triggerServerEvent ("position1", getLocalPlayer()) elseif (source == GUIEditor_Button[6]) then triggerServerEvent ("regroup1", getLocalPlayer()) elseif (source == GUIEditor_Button[7]) then triggerServerEvent ("com_go1", getLocalPlayer()) elseif (source == GUIEditor_Button[8]) then triggerServerEvent ("fallback1", getLocalPlayer()) elseif (source == GUIEditor_Button[9]) then triggerServerEvent ("sticktog1", getLocalPlayer()) elseif (source == GUIEditor_Button[10]) then triggerServerEvent ("ct_backup1", getLocalPlayer()) elseif (source == GUIEditor_Button[11]) then triggerServerEvent ("roger1", getLocalPlayer()) elseif (source == GUIEditor_Button[12]) then triggerServerEvent ("negative1", getLocalPlayer()) elseif (source == GUIEditor_Button[13]) then triggerServerEvent ("com_reportin1", getLocalPlayer()) elseif (source == GUIEditor_Button[14]) then triggerServerEvent ("ct_inpos1", getLocalPlayer()) elseif (source == GUIEditor_Button[15]) then triggerServerEvent ("clear1", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function ToggleazozMenu() if (guiGetVisible(GUIEditor_Window[1]) == true) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else guiSetVisible(GUIEditor_Window[1], true) showCursor(true) playersColumn = guiGridListAddColumn(playerGridList,"Players",0.85) guiGridListSetSelectionMode(playerGridList,2) for id, plaItem in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( playerGridList ) guiGridListSetItemText ( playerGridList, row, playersColumn, getPlayerName ( plaItem ), false, false ) end addEventHandler( "onClientGUIClick", playerGridList, setGUI ) local sound = playSound("DontHaveTime.mp3") setSoundVolume(sound, 2.5) end end bindKey("F2","down",ToggleazozMenu) outputChatBox("Press F2 To Open ||CounteR Strike Script|| !!!",0,255,255) ----------------- addEvent("followme",true) addEventHandler("followme",getRootElement(), function () local sound = playSound("followme.mp3") setSoundVolume(sound, 2.0) end) ------------------- addEvent("ct_coverme",true) addEventHandler("ct_coverme",getRootElement(), function () local sound = playSound("ct_coverme.mp3") setSoundVolume(sound, 2.0) end) ------------------ addEvent("stormfront",true) addEventHandler("stormfront",getRootElement(), function () local sound = playSound("stormfront.mp3") setSoundVolume(sound, 2.0) end) ------------------------ addEvent("fireassis",true) addEventHandler("fireassis",getRootElement(), function () local sound = playSound("fireassis.mp3") setSoundVolume(sound, 2.0) end) ----------------------- addEvent("position",true) addEventHandler("position",getRootElement(), function () local sound = playSound("position.mp3") setSoundVolume(sound, 2.0) end) ---------------------------- addEvent("regroup",true) addEventHandler("regroup",getRootElement(), function () local sound = playSound("regroup.mp3") setSoundVolume(sound, 2.0) end) ----------------------------- addEvent("com_go",true) addEventHandler("com_go",getRootElement(), function () local sound = playSound("com_go.mp3") setSoundVolume(sound, 2.0) end) ----------------------------- addEvent("fallback",true) addEventHandler("fallback",getRootElement(), function () local sound = playSound("fallback.mp3") setSoundVolume(sound, 2.0) end) --------------------------------------- addEvent("sticktog",true) addEventHandler("sticktog",getRootElement(), function () local sound = playSound("sticktog.mp3") setSoundVolume(sound, 2.0) end) ------------------------------- addEvent("ct_backup",true) addEventHandler("ct_backup",getRootElement(), function () local sound = playSound("ct_backup.mp3") setSoundVolume(sound, 2.0) end) ---------------------------- addEvent("roger",true) addEventHandler("roger",getRootElement(), function () local sound = playSound("roger.mp3") setSoundVolume(sound, 2.0) end) --------------------------------- addEvent("negative",true) addEventHandler("negative",getRootElement(), function () local sound = playSound("negative.mp3") setSoundVolume(sound, 2.0) end) ---------------------------------- addEvent("com_reportin",true) addEventHandler("com_reportin",getRootElement(), function () local sound = playSound("com_reportin.mp3") setSoundVolume(sound, 2.0) end) ------------------------------------ addEvent("ct_inpos",true) addEventHandler("ct_inpos",getRootElement(), function () local sound = playSound("ct_inpos.mp3") setSoundVolume(sound, 2.0) end) ------------------------------------ addEvent("clear",true) addEventHandler("clear",getRootElement(), function () local sound = playSound("clear.mp3") setSoundVolume(sound, 2.0) end) Server Side : addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("clear",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_inpos1", true) addEventHandler("ct_inpos1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_inpos",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": I'm in Position!", getRootElement(), 0,255,255, true) end end ) addEvent("com_reportin1", true) addEventHandler("com_reportin1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_reportin",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Report In Team!", getRootElement(), 0,255,255, true) end end ) addEvent("negative1", true) addEventHandler("negative1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("negative",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Negative!", getRootElement(), 0,255,255, true) end end ) addEvent("roger1", true) addEventHandler("roger1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("roger",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Roger That!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_backup1", true) addEventHandler("ct_backup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_backup",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Need Backup!", getRootElement(), 0,255,255, true) end end ) addEvent("sticktog1", true) addEventHandler("sticktog1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("sticktog",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Stick Together Team!", getRootElement(), 0,255,255, true) end end ) addEvent("fallback1", true) addEventHandler("fallback1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fallback",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Team Fall Back!", getRootElement(), 0,255,255, true) end end ) addEvent("com_go1", true) addEventHandler("com_go1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_go",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Go Go Go!", getRootElement(), 0,255,255, true) end end ) addEvent("regroup1", true) addEventHandler("regroup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("regroup",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Regroup Team!", getRootElement(), 0,255,255, true) end end ) addEvent("position1", true) addEventHandler("position1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("position",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Hold this Position!", getRootElement(), 0,255,255, true) end end ) addEvent("fireassis1", true) addEventHandler("fireassis1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fireassis",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Taking Fire, Need Assistance!", getRootElement(), 0,255,255, true) end end ) addEvent("stormfront1", true) addEventHandler("stormfront1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("stormfront",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Storm the Front!", getRootElement(), 0,255,255, true) end end ) addEvent("followme1", true) addEventHandler("followme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("followme",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Follow Me!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_coverme1", true) addEventHandler("ct_coverme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_coverme",getRootElement()) outputChatBox("[RADIO] "..getPlayerName(source)..": Cover Me!", getRootElement(), 0,255,255, true) end end ) HELP ME pleas I am HoLsTeN Link to comment
Kenix Posted January 31, 2011 Share Posted January 31, 2011 1.use https://wiki.multitheftauto.com/wiki/SetSoundVolume 2.0 not work only works up to 1 volume 2.use setTimer (clear1,60000,1, false) 3.use https://wiki.multitheftauto.com/wiki/GetElementsByType Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 1.use https://wiki.multitheftauto.com/wiki/SetSoundVolume 2.0 not work only works up to 1 volume2.use setTimer (clear1,60000,1, false) 3.use https://wiki.multitheftauto.com/wiki/GetElementsByType 2.use setTimer (clear1,60000,1, false) i use in server side ??????? can you give me code pleas Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 server side addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("clear",getRootElement()) setTimer (clear1,60000,1, false outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end end ) not work >< Link to comment
Kenix Posted January 31, 2011 Share Posted January 31, 2011 wtf line 7 ...... ololol setTimer (clear1,60000,1, false) Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 i do like what you say but it is not work you can play the command i say in 1 minets you can play the command 1 time and just my team can here the sounds this is the time code like you say addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("clear",getRootElement()) setTimer (clear1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_inpos1", true) addEventHandler("ct_inpos1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_inpos",getRootElement()) setTimer (ct_inpos1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": I'm in Position!", getRootElement(), 0,255,255, true) end end ) addEvent("com_reportin1", true) addEventHandler("com_reportin1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_reportin",getRootElement()) setTimer (com_reportin1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Report In Team!", getRootElement(), 0,255,255, true) end end ) addEvent("negative1", true) addEventHandler("negative1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("negative",getRootElement()) setTimer (negative1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Negative!", getRootElement(), 0,255,255, true) end end ) addEvent("roger1", true) addEventHandler("roger1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("roger",getRootElement()) setTimer (roger1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Roger That!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_backup1", true) addEventHandler("ct_backup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_backup",getRootElement()) setTimer (ct_backup1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Need Backup!", getRootElement(), 0,255,255, true) end end ) addEvent("sticktog1", true) addEventHandler("sticktog1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("sticktog",getRootElement()) setTimer (sticktog1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Stick Together Team!", getRootElement(), 0,255,255, true) end end ) addEvent("fallback1", true) addEventHandler("fallback1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fallback",getRootElement()) setTimer (fallback1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Team Fall Back!", getRootElement(), 0,255,255, true) end end ) addEvent("com_go1", true) addEventHandler("com_go1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_go",getRootElement()) setTimer (com_go1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Go Go Go!", getRootElement(), 0,255,255, true) end end ) addEvent("regroup1", true) addEventHandler("regroup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("regroup",getRootElement()) setTimer (regroup1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Regroup Team!", getRootElement(), 0,255,255, true) end end ) addEvent("position1", true) addEventHandler("position1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("position",getRootElement()) setTimer (position1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Hold this Position!", getRootElement(), 0,255,255, true) end end ) addEvent("fireassis1", true) addEventHandler("fireassis1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fireassis",getRootElement()) setTimer (fireassis1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Taking Fire, Need Assistance!", getRootElement(), 0,255,255, true) end end ) addEvent("stormfront1", true) addEventHandler("stormfront1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("stormfront",getRootElement()) setTimer (stormfront1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Storm the Front!", getRootElement(), 0,255,255, true) end end ) addEvent("followme1", true) addEventHandler("followme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("followme",getRootElement()) setTimer (followme1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Follow Me!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_coverme1", true) addEventHandler("ct_coverme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_coverme",getRootElement()) setTimer (ct_coverme1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Cover Me!", getRootElement(), 0,255,255, true) end end ) and not work Link to comment
Kenix Posted January 31, 2011 Share Posted January 31, 2011 use setTimer(function() removeEventHandler("clear1",getRootElement(), function() end, 60000,1) Link to comment
proracer Posted January 31, 2011 Share Posted January 31, 2011 i do like what you say but it is not work you can play the command i say in 1 minets you can play the command 1 time and just my team can here the sounds this is the time code like you say addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("clear",getRootElement()) setTimer (clear1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_inpos1", true) addEventHandler("ct_inpos1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_inpos",getRootElement()) setTimer (ct_inpos1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": I'm in Position!", getRootElement(), 0,255,255, true) end end ) addEvent("com_reportin1", true) addEventHandler("com_reportin1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_reportin",getRootElement()) setTimer (com_reportin1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Report In Team!", getRootElement(), 0,255,255, true) end end ) addEvent("negative1", true) addEventHandler("negative1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("negative",getRootElement()) setTimer (negative1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Negative!", getRootElement(), 0,255,255, true) end end ) addEvent("roger1", true) addEventHandler("roger1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("roger",getRootElement()) setTimer (roger1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Roger That!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_backup1", true) addEventHandler("ct_backup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_backup",getRootElement()) setTimer (ct_backup1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Need Backup!", getRootElement(), 0,255,255, true) end end ) addEvent("sticktog1", true) addEventHandler("sticktog1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("sticktog",getRootElement()) setTimer (sticktog1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Stick Together Team!", getRootElement(), 0,255,255, true) end end ) addEvent("fallback1", true) addEventHandler("fallback1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fallback",getRootElement()) setTimer (fallback1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Team Fall Back!", getRootElement(), 0,255,255, true) end end ) addEvent("com_go1", true) addEventHandler("com_go1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_go",getRootElement()) setTimer (com_go1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Go Go Go!", getRootElement(), 0,255,255, true) end end ) addEvent("regroup1", true) addEventHandler("regroup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("regroup",getRootElement()) setTimer (regroup1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Regroup Team!", getRootElement(), 0,255,255, true) end end ) addEvent("position1", true) addEventHandler("position1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("position",getRootElement()) setTimer (position1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Hold this Position!", getRootElement(), 0,255,255, true) end end ) addEvent("fireassis1", true) addEventHandler("fireassis1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fireassis",getRootElement()) setTimer (fireassis1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Taking Fire, Need Assistance!", getRootElement(), 0,255,255, true) end end ) addEvent("stormfront1", true) addEventHandler("stormfront1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("stormfront",getRootElement()) setTimer (stormfront1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Storm the Front!", getRootElement(), 0,255,255, true) end end ) addEvent("followme1", true) addEventHandler("followme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("followme",getRootElement()) setTimer (followme1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Follow Me!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_coverme1", true) addEventHandler("ct_coverme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_coverme",getRootElement()) setTimer (ct_coverme1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Cover Me!", getRootElement(), 0,255,255, true) end end ) and not work Change last argument in outputChatBox to false not true.True is used only for colorcodes.Btw why did you used function takePlayerMoney(source, 0) - amount 0 lol? Why did you used the function anyways... it does nothing at all. Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("clear",getRootElement()) setTimer(function() removeEventHandler("clear1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_inpos1", true) addEventHandler("ct_inpos1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_inpos",getRootElement()) setTimer(function() removeEventHandler("ct_inpos1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": I'm in Position!", getRootElement(), 0,255,255, true) end end ) addEvent("com_reportin1", true) addEventHandler("com_reportin1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_reportin",getRootElement()) setTimer(function() removeEventHandler("com_reportin1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Report In Team!", getRootElement(), 0,255,255, true) end end ) addEvent("negative1", true) addEventHandler("negative1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("negative",getRootElement()) setTimer(function() removeEventHandler("negative1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Negative!", getRootElement(), 0,255,255, true) end end ) addEvent("roger1", true) addEventHandler("roger1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("roger",getRootElement()) setTimer(function() removeEventHandler("roger1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Roger That!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_backup1", true) addEventHandler("ct_backup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_backup",getRootElement()) setTimer(function() removeEventHandler("ct_backup1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Need Backup!", getRootElement(), 0,255,255, true) end end ) addEvent("sticktog1", true) addEventHandler("sticktog1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("sticktog",getRootElement()) setTimer(function() removeEventHandler("sticktog1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Stick Together Team!", getRootElement(), 0,255,255, true) end end ) addEvent("fallback1", true) addEventHandler("fallback1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fallback",getRootElement()) setTimer(function() removeEventHandler("fallback1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Team Fall Back!", getRootElement(), 0,255,255, true) end end ) addEvent("com_go1", true) addEventHandler("com_go1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_go",getRootElement()) setTimer(function() removeEventHandler("com_go1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Go Go Go!", getRootElement(), 0,255,255, true) end end ) addEvent("regroup1", true) addEventHandler("regroup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("regroup",getRootElement()) setTimer(function() removeEventHandler("regroup1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Regroup Team!", getRootElement(), 0,255,255, false) end end ) addEvent("position1", true) addEventHandler("position1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("position",getRootElement()) setTimer(function() removeEventHandler("position1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Hold this Position!", getRootElement(), 0,255,255, false) end end ) addEvent("fireassis1", true) addEventHandler("fireassis1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fireassis",getRootElement()) setTimer(function() removeEventHandler("fireassis1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Taking Fire, Need Assistance!", getRootElement(), 0,255,255, false) end end ) addEvent("stormfront1", true) addEventHandler("stormfront1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("stormfront",getRootElement()) setTimer(function() removeEventHandler("stormfront1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Storm the Front!", getRootElement(), 0,255,255, false) end end ) addEvent("followme1", true) addEventHandler("followme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("followme",getRootElement()) setTimer(function() removeEventHandler("followme1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Follow Me!", getRootElement(), 0,255,255, false) end end ) addEvent("ct_coverme1", true) addEventHandler("ct_coverme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_coverme",getRootElement()) setTimer(function() removeEventHandler("ct_coverme1",getRootElement(), function() end, 60000,1) outputChatBox("[RADIO] "..getPlayerName(source)..": Cover Me!", getRootElement(), 0,255,255, false) end end ) not work Again Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 i do like what you say but it is not work you can play the command i say in 1 minets you can play the command 1 time and just my team can here the sounds this is the time code like you say addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("clear",getRootElement()) setTimer (clear1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_inpos1", true) addEventHandler("ct_inpos1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_inpos",getRootElement()) setTimer (ct_inpos1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": I'm in Position!", getRootElement(), 0,255,255, true) end end ) addEvent("com_reportin1", true) addEventHandler("com_reportin1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_reportin",getRootElement()) setTimer (com_reportin1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Report In Team!", getRootElement(), 0,255,255, true) end end ) addEvent("negative1", true) addEventHandler("negative1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("negative",getRootElement()) setTimer (negative1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Negative!", getRootElement(), 0,255,255, true) end end ) addEvent("roger1", true) addEventHandler("roger1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("roger",getRootElement()) setTimer (roger1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Roger That!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_backup1", true) addEventHandler("ct_backup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_backup",getRootElement()) setTimer (ct_backup1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Need Backup!", getRootElement(), 0,255,255, true) end end ) addEvent("sticktog1", true) addEventHandler("sticktog1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("sticktog",getRootElement()) setTimer (sticktog1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Stick Together Team!", getRootElement(), 0,255,255, true) end end ) addEvent("fallback1", true) addEventHandler("fallback1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fallback",getRootElement()) setTimer (fallback1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Team Fall Back!", getRootElement(), 0,255,255, true) end end ) addEvent("com_go1", true) addEventHandler("com_go1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("com_go",getRootElement()) setTimer (com_go1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Go Go Go!", getRootElement(), 0,255,255, true) end end ) addEvent("regroup1", true) addEventHandler("regroup1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("regroup",getRootElement()) setTimer (regroup1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Regroup Team!", getRootElement(), 0,255,255, true) end end ) addEvent("position1", true) addEventHandler("position1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("position",getRootElement()) setTimer (position1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Hold this Position!", getRootElement(), 0,255,255, true) end end ) addEvent("fireassis1", true) addEventHandler("fireassis1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("fireassis",getRootElement()) setTimer (fireassis1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Taking Fire, Need Assistance!", getRootElement(), 0,255,255, true) end end ) addEvent("stormfront1", true) addEventHandler("stormfront1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("stormfront",getRootElement()) setTimer (stormfront1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Storm the Front!", getRootElement(), 0,255,255, true) end end ) addEvent("followme1", true) addEventHandler("followme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("followme",getRootElement()) setTimer (followme1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Follow Me!", getRootElement(), 0,255,255, true) end end ) addEvent("ct_coverme1", true) addEventHandler("ct_coverme1", getRootElement(), function() if ( getPlayerMoney (source) >= 0 ) then takePlayerMoney(source, 0) triggerClientEvent("ct_coverme",getRootElement()) setTimer (ct_coverme1,60000,1, false) outputChatBox("[RADIO] "..getPlayerName(source)..": Cover Me!", getRootElement(), 0,255,255, true) end end ) and not work Change last argument in outputChatBox to false not true.True is used only for colorcodes.Btw why did you used function takePlayerMoney(source, 0) - amount 0 lol? Why did you used the function anyways... it does nothing at all. thanks did you can till me how can just my team here the sounds ?? Link to comment
proracer Posted January 31, 2011 Share Posted January 31, 2011 Use 'team' element besides getRootElement. Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 Use 'team' element besides getRootElement. sorry man i am not good scripter like you can you give the code pleas ths is my first script help me Link to comment
Castillo Posted January 31, 2011 Share Posted January 31, 2011 This sounds like a rip off from my "Userpanel" script, since you are checking if him has no money o_o, you can do it like this to stop them from using it many times: GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(345,168,342,446,"CounteR Strike Script By HoLsTeN 1.0",false) guiSetVisible(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,324,417,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("CounteR Strike",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(7,147,95,32,"Follow Me",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(7,191,95,32,"Cover Me",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(7,235,95,32,"storm front",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(7,280,95,32,"Taking Fire",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(7,326,95,32,"Hold this Position",false,GUIEditor_Tab[1]) GUIEditor_Button[6] = guiCreateButton(113,147,95,32,"Regroup Team",false,GUIEditor_Tab[1]) GUIEditor_Button[7] = guiCreateButton(114,191,95,32,"Go Go Go",false,GUIEditor_Tab[1]) GUIEditor_Button[8] = guiCreateButton(116,235,95,32,"Fall Back",false,GUIEditor_Tab[1]) GUIEditor_Button[9] = guiCreateButton(117,280,95,32,"stick Togeher Team",false,GUIEditor_Tab[1]) GUIEditor_Button[10] = guiCreateButton(118,326,95,32,"Need Backup",false,GUIEditor_Tab[1]) GUIEditor_Button[11] = guiCreateButton(219,147,95,32,"Roger That",false,GUIEditor_Tab[1]) GUIEditor_Button[12] = guiCreateButton(221,191,95,32,"Negative",false,GUIEditor_Tab[1]) GUIEditor_Button[13] = guiCreateButton(220,235,95,32,"Report In",false,GUIEditor_Tab[1]) GUIEditor_Button[14] = guiCreateButton(221,280,95,32,"I'm in Position",false,GUIEditor_Tab[1]) GUIEditor_Button[15] = guiCreateButton(221,326,95,32,"Sector Clear",false,GUIEditor_Tab[1]) GUIEditor_Image[1] = guiCreateStaticImage(4,7,314,138,"11.png",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(12,370,308,19,"Just click on the button 1 time By HoLsTeN Have Fun",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ("followme1", getLocalPlayer()) elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("ct_coverme1", getLocalPlayer()) elseif (source == GUIEditor_Button[3]) then triggerServerEvent ("stormfront1", getLocalPlayer()) elseif (source == GUIEditor_Button[4]) then triggerServerEvent ("fireassis1", getLocalPlayer()) elseif (source == GUIEditor_Button[5]) then triggerServerEvent ("position1", getLocalPlayer()) elseif (source == GUIEditor_Button[6]) then triggerServerEvent ("regroup1", getLocalPlayer()) elseif (source == GUIEditor_Button[7]) then triggerServerEvent ("com_go1", getLocalPlayer()) elseif (source == GUIEditor_Button[8]) then triggerServerEvent ("fallback1", getLocalPlayer()) elseif (source == GUIEditor_Button[9]) then triggerServerEvent ("sticktog1", getLocalPlayer()) elseif (source == GUIEditor_Button[10]) then triggerServerEvent ("ct_backup1", getLocalPlayer()) elseif (source == GUIEditor_Button[11]) then triggerServerEvent ("roger1", getLocalPlayer()) elseif (source == GUIEditor_Button[12]) then triggerServerEvent ("negative1", getLocalPlayer()) elseif (source == GUIEditor_Button[13]) then triggerServerEvent ("com_reportin1", getLocalPlayer()) elseif (source == GUIEditor_Button[14]) then triggerServerEvent ("ct_inpos1", getLocalPlayer()) elseif (source == GUIEditor_Button[15]) then triggerServerEvent ("clear1", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function ToggleazozMenu() if (guiGetVisible(GUIEditor_Window[1]) == true) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else guiSetVisible(GUIEditor_Window[1], true) showCursor(true) playersColumn = guiGridListAddColumn(playerGridList,"Players",0.85) guiGridListSetSelectionMode(playerGridList,2) for id, plaItem in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( playerGridList ) guiGridListSetItemText ( playerGridList, row, playersColumn, getPlayerName ( plaItem ), false, false ) end addEventHandler( "onClientGUIClick", playerGridList, setGUI ) local sound = playSound("DontHaveTime.mp3") setSoundVolume(sound, 2.5) end end bindKey("F2","down",ToggleazozMenu) outputChatBox("Press F2 To Open ||CounteR Strike Script|| !!!",0,255,255) ----------------- enabled = 1 function enable() enabled = 1 end addEvent("followme",true) addEventHandler("followme",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("followme.mp3") setSoundVolume(sound, 2.0) end end) ------------------- addEvent("ct_coverme",true) addEventHandler("ct_coverme",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_coverme.mp3") setSoundVolume(sound, 2.0) end end) ------------------ addEvent("stormfront",true) addEventHandler("stormfront",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("stormfront.mp3") setSoundVolume(sound, 2.0) end end) ------------------------ addEvent("fireassis",true) addEventHandler("fireassis",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("fireassis.mp3") setSoundVolume(sound, 2.0) end end) ----------------------- addEvent("position",true) addEventHandler("position",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("position.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------- addEvent("regroup",true) addEventHandler("regroup",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("regroup.mp3") setSoundVolume(sound, 2.0) end end) ----------------------------- addEvent("com_go",true) addEventHandler("com_go",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("com_go.mp3") setSoundVolume(sound, 2.0) end end) ----------------------------- addEvent("fallback",true) addEventHandler("fallback",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("fallback.mp3") setSoundVolume(sound, 2.0) end end) --------------------------------------- addEvent("sticktog",true) addEventHandler("sticktog",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("sticktog.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------- addEvent("ct_backup",true) addEventHandler("ct_backup",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_backup.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------- addEvent("roger",true) addEventHandler("roger",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("roger.mp3") setSoundVolume(sound, 2.0) end end) --------------------------------- addEvent("negative",true) addEventHandler("negative",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("negative.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------------- addEvent("com_reportin",true) addEventHandler("com_reportin",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("com_reportin.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------------ addEvent("ct_inpos",true) addEventHandler("ct_inpos",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_inpos.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------------ addEvent("clear",true) addEventHandler("clear",getRootElement(), function () if enabled == 1 then enabled = 0 setTimer(enable,6000,1) local sound = playSound("clear.mp3") setSoundVolume(sound, 2.0) end Link to comment
proracer Posted January 31, 2011 Share Posted January 31, 2011 This sounds like a rip off from my "Userpanel" script, since you are checking if him has no money o_o, you can do it like this to stop them from using it many times: GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(345,168,342,446,"CounteR Strike Script By HoLsTeN 1.0",false) guiSetVisible(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,324,417,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("CounteR Strike",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(7,147,95,32,"Follow Me",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(7,191,95,32,"Cover Me",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(7,235,95,32,"storm front",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(7,280,95,32,"Taking Fire",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(7,326,95,32,"Hold this Position",false,GUIEditor_Tab[1]) GUIEditor_Button[6] = guiCreateButton(113,147,95,32,"Regroup Team",false,GUIEditor_Tab[1]) GUIEditor_Button[7] = guiCreateButton(114,191,95,32,"Go Go Go",false,GUIEditor_Tab[1]) GUIEditor_Button[8] = guiCreateButton(116,235,95,32,"Fall Back",false,GUIEditor_Tab[1]) GUIEditor_Button[9] = guiCreateButton(117,280,95,32,"stick Togeher Team",false,GUIEditor_Tab[1]) GUIEditor_Button[10] = guiCreateButton(118,326,95,32,"Need Backup",false,GUIEditor_Tab[1]) GUIEditor_Button[11] = guiCreateButton(219,147,95,32,"Roger That",false,GUIEditor_Tab[1]) GUIEditor_Button[12] = guiCreateButton(221,191,95,32,"Negative",false,GUIEditor_Tab[1]) GUIEditor_Button[13] = guiCreateButton(220,235,95,32,"Report In",false,GUIEditor_Tab[1]) GUIEditor_Button[14] = guiCreateButton(221,280,95,32,"I'm in Position",false,GUIEditor_Tab[1]) GUIEditor_Button[15] = guiCreateButton(221,326,95,32,"Sector Clear",false,GUIEditor_Tab[1]) GUIEditor_Image[1] = guiCreateStaticImage(4,7,314,138,"11.png",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(12,370,308,19,"Just click on the button 1 time By HoLsTeN Have Fun",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ("followme1", getLocalPlayer()) elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("ct_coverme1", getLocalPlayer()) elseif (source == GUIEditor_Button[3]) then triggerServerEvent ("stormfront1", getLocalPlayer()) elseif (source == GUIEditor_Button[4]) then triggerServerEvent ("fireassis1", getLocalPlayer()) elseif (source == GUIEditor_Button[5]) then triggerServerEvent ("position1", getLocalPlayer()) elseif (source == GUIEditor_Button[6]) then triggerServerEvent ("regroup1", getLocalPlayer()) elseif (source == GUIEditor_Button[7]) then triggerServerEvent ("com_go1", getLocalPlayer()) elseif (source == GUIEditor_Button[8]) then triggerServerEvent ("fallback1", getLocalPlayer()) elseif (source == GUIEditor_Button[9]) then triggerServerEvent ("sticktog1", getLocalPlayer()) elseif (source == GUIEditor_Button[10]) then triggerServerEvent ("ct_backup1", getLocalPlayer()) elseif (source == GUIEditor_Button[11]) then triggerServerEvent ("roger1", getLocalPlayer()) elseif (source == GUIEditor_Button[12]) then triggerServerEvent ("negative1", getLocalPlayer()) elseif (source == GUIEditor_Button[13]) then triggerServerEvent ("com_reportin1", getLocalPlayer()) elseif (source == GUIEditor_Button[14]) then triggerServerEvent ("ct_inpos1", getLocalPlayer()) elseif (source == GUIEditor_Button[15]) then triggerServerEvent ("clear1", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function ToggleazozMenu() if (guiGetVisible(GUIEditor_Window[1]) == true) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else guiSetVisible(GUIEditor_Window[1], true) showCursor(true) playersColumn = guiGridListAddColumn(playerGridList,"Players",0.85) guiGridListSetSelectionMode(playerGridList,2) for id, plaItem in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( playerGridList ) guiGridListSetItemText ( playerGridList, row, playersColumn, getPlayerName ( plaItem ), false, false ) end addEventHandler( "onClientGUIClick", playerGridList, setGUI ) local sound = playSound("DontHaveTime.mp3") setSoundVolume(sound, 2.5) end end bindKey("F2","down",ToggleazozMenu) outputChatBox("Press F2 To Open ||CounteR Strike Script|| !!!",0,255,255) ----------------- enabled = 1 function enable() enabled = 1 end addEvent("followme",true) addEventHandler("followme",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("followme.mp3") setSoundVolume(sound, 2.0) end end) ------------------- addEvent("ct_coverme",true) addEventHandler("ct_coverme",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_coverme.mp3") setSoundVolume(sound, 2.0) end end) ------------------ addEvent("stormfront",true) addEventHandler("stormfront",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("stormfront.mp3") setSoundVolume(sound, 2.0) end end) ------------------------ addEvent("fireassis",true) addEventHandler("fireassis",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("fireassis.mp3") setSoundVolume(sound, 2.0) end end) ----------------------- addEvent("position",true) addEventHandler("position",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("position.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------- addEvent("regroup",true) addEventHandler("regroup",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("regroup.mp3") setSoundVolume(sound, 2.0) end end) ----------------------------- addEvent("com_go",true) addEventHandler("com_go",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("com_go.mp3") setSoundVolume(sound, 2.0) end end) ----------------------------- addEvent("fallback",true) addEventHandler("fallback",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("fallback.mp3") setSoundVolume(sound, 2.0) end end) --------------------------------------- addEvent("sticktog",true) addEventHandler("sticktog",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("sticktog.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------- addEvent("ct_backup",true) addEventHandler("ct_backup",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_backup.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------- addEvent("roger",true) addEventHandler("roger",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("roger.mp3") setSoundVolume(sound, 2.0) end end) --------------------------------- addEvent("negative",true) addEventHandler("negative",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("negative.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------------- addEvent("com_reportin",true) addEventHandler("com_reportin",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("com_reportin.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------------ addEvent("ct_inpos",true) addEventHandler("ct_inpos",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_inpos.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------------ addEvent("clear",true) addEventHandler("clear",getRootElement(), function () if enabled == 1 then enabled = 0 setTimer(enable,6000,1) local sound = Link to comment
Castillo Posted January 31, 2011 Share Posted January 31, 2011 What? i don't get you, i just copied his code and added a check to stop using the buttons every second. Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 What? i don't get you, i just copied his code and added a check to stop using the buttons every second. SOLID YOUR CODE WORK BUT ALL IN MY TEAM CANT PRESS THE buttons THAY MOST Waiting FOR 60 TO Here the sounds i want jast my player cant press the buttons .... Link to comment
Castillo Posted January 31, 2011 Share Posted January 31, 2011 That's because your trigger is for EVERY player in the server, this should work. addEvent("clear1", true) addEventHandler("clear1", getRootElement(), function() triggerClientEvent(source,"clear",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Sector Clear!", getRootElement(), 0,255,255, true) end ) addEvent("ct_inpos1", true) addEventHandler("ct_inpos1", getRootElement(), function() triggerClientEvent(source,"ct_inpos",source) outputChatBox("[RADIO] "..getPlayerName(source)..": I'm in Position!", getRootElement(), 0,255,255, true) end ) addEvent("com_reportin1", true) addEventHandler("com_reportin1", getRootElement(), function() triggerClientEvent(source,"com_reportin",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Report In Team!", getRootElement(), 0,255,255, true) end ) addEvent("negative1", true) addEventHandler("negative1", getRootElement(), function() triggerClientEvent(source,"negative",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Negative!", getRootElement(), 0,255,255, true) end ) addEvent("roger1", true) addEventHandler("roger1", getRootElement(), function() triggerClientEvent(source,"roger",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Roger That!", getRootElement(), 0,255,255, true) end ) addEvent("ct_backup1", true) addEventHandler("ct_backup1", getRootElement(), function() triggerClientEvent(source,"ct_backup",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Need Backup!", getRootElement(), 0,255,255, true) end ) addEvent("sticktog1", true) addEventHandler("sticktog1", getRootElement(), function() triggerClientEvent(source,"sticktog",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Stick Together Team!", getRootElement(), 0,255,255, true) end ) addEvent("fallback1", true) addEventHandler("fallback1", getRootElement(), function() triggerClientEvent(source,"fallback",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Team Fall Back!", getRootElement(), 0,255,255, true) end ) addEvent("com_go1", true) addEventHandler("com_go1", getRootElement(), function() triggerClientEvent(source,"com_go",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Go Go Go!", getRootElement(), 0,255,255, true) end ) addEvent("regroup1", true) addEventHandler("regroup1", getRootElement(), function() triggerClientEvent(source,"regroup",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Regroup Team!", getRootElement(), 0,255,255, true) end ) addEvent("position1", true) addEventHandler("position1", getRootElement(), function() triggerClientEvent(source,"position",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Hold this Position!", getRootElement(), 0,255,255, true) end ) addEvent("fireassis1", true) addEventHandler("fireassis1", getRootElement(), function() triggerClientEvent(source,"fireassis",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Taking Fire, Need Assistance!", getRootElement(), 0,255,255, true) end end ) addEvent("stormfront1", true) addEventHandler("stormfront1", getRootElement(), function() triggerClientEvent(source,"stormfront",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Storm the Front!", getRootElement(), 0,255,255, true) end end ) addEvent("followme1", true) addEventHandler("followme1", getRootElement(), function() triggerClientEvent(source,"followme",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Follow Me!", getRootElement(), 0,255,255, true) end ) addEvent("ct_coverme1", true) addEventHandler("ct_coverme1", getRootElement(), function() triggerClientEvent(source,"ct_coverme",source) outputChatBox("[RADIO] "..getPlayerName(source)..": Cover Me!", getRootElement(), 0,255,255, true) end ) Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 Not work >< sorry man I ask a lot Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 What doesn't "work"? Your code not work Link to comment
Castillo Posted January 31, 2011 Share Posted January 31, 2011 Omg, first don't Quote the Last post, second, WHAT DOESN'T WORK ON IT? Link to comment
HoLsTeN Posted January 31, 2011 Author Share Posted January 31, 2011 i say your code i replace with the old server side then the script not work just show the window and the see : cilent side GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(345,168,342,446,"CounteR Strike Script By HoLsTeN 1.0",false) guiSetVisible(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,324,417,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("CounteR Strike",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(7,147,95,32,"Follow Me",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(7,191,95,32,"Cover Me",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(7,235,95,32,"storm front",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(7,280,95,32,"Taking Fire",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(7,326,95,32,"Hold this Position",false,GUIEditor_Tab[1]) GUIEditor_Button[6] = guiCreateButton(113,147,95,32,"Regroup Team",false,GUIEditor_Tab[1]) GUIEditor_Button[7] = guiCreateButton(114,191,95,32,"Go Go Go",false,GUIEditor_Tab[1]) GUIEditor_Button[8] = guiCreateButton(116,235,95,32,"Fall Back",false,GUIEditor_Tab[1]) GUIEditor_Button[9] = guiCreateButton(117,280,95,32,"stick Togeher Team",false,GUIEditor_Tab[1]) GUIEditor_Button[10] = guiCreateButton(118,326,95,32,"Need Backup",false,GUIEditor_Tab[1]) GUIEditor_Button[11] = guiCreateButton(219,147,95,32,"Roger That",false,GUIEditor_Tab[1]) GUIEditor_Button[12] = guiCreateButton(221,191,95,32,"Negative",false,GUIEditor_Tab[1]) GUIEditor_Button[13] = guiCreateButton(220,235,95,32,"Report In",false,GUIEditor_Tab[1]) GUIEditor_Button[14] = guiCreateButton(221,280,95,32,"I'm in Position",false,GUIEditor_Tab[1]) GUIEditor_Button[15] = guiCreateButton(221,326,95,32,"Sector Clear",false,GUIEditor_Tab[1]) GUIEditor_Image[1] = guiCreateStaticImage(4,7,314,138,"11.png",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(12,370,308,19,"Just click on the button 1 time By HoLsTeN Have Fun",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],0,255,0) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ("followme1", getLocalPlayer()) elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("ct_coverme1", getLocalPlayer()) elseif (source == GUIEditor_Button[3]) then triggerServerEvent ("stormfront1", getLocalPlayer()) elseif (source == GUIEditor_Button[4]) then triggerServerEvent ("fireassis1", getLocalPlayer()) elseif (source == GUIEditor_Button[5]) then triggerServerEvent ("position1", getLocalPlayer()) elseif (source == GUIEditor_Button[6]) then triggerServerEvent ("regroup1", getLocalPlayer()) elseif (source == GUIEditor_Button[7]) then triggerServerEvent ("com_go1", getLocalPlayer()) elseif (source == GUIEditor_Button[8]) then triggerServerEvent ("fallback1", getLocalPlayer()) elseif (source == GUIEditor_Button[9]) then triggerServerEvent ("sticktog1", getLocalPlayer()) elseif (source == GUIEditor_Button[10]) then triggerServerEvent ("ct_backup1", getLocalPlayer()) elseif (source == GUIEditor_Button[11]) then triggerServerEvent ("roger1", getLocalPlayer()) elseif (source == GUIEditor_Button[12]) then triggerServerEvent ("negative1", getLocalPlayer()) elseif (source == GUIEditor_Button[13]) then triggerServerEvent ("com_reportin1", getLocalPlayer()) elseif (source == GUIEditor_Button[14]) then triggerServerEvent ("ct_inpos1", getLocalPlayer()) elseif (source == GUIEditor_Button[15]) then triggerServerEvent ("clear1", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function ToggleazozMenu() if (guiGetVisible(GUIEditor_Window[1]) == true) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else guiSetVisible(GUIEditor_Window[1], true) showCursor(true) playersColumn = guiGridListAddColumn(playerGridList,"Players",0.85) guiGridListSetSelectionMode(playerGridList,2) for id, plaItem in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( playerGridList ) guiGridListSetItemText ( playerGridList, row, playersColumn, getPlayerName ( plaItem ), false, false ) end addEventHandler( "onClientGUIClick", playerGridList, setGUI ) local sound = playSound("DontHaveTime.mp3") setSoundVolume(sound, 2.5) end end bindKey("F2","down",ToggleazozMenu) outputChatBox("Press F2 To Open ||CounteR Strike Script|| !!!",0,255,255) ----------------- enabled = 1 function enable() enabled = 1 end addEvent("followme",true) addEventHandler("followme",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("followme.mp3") setSoundVolume(sound, 2.0) end end) ------------------- addEvent("ct_coverme",true) addEventHandler("ct_coverme",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_coverme.mp3") setSoundVolume(sound, 2.0) end end) ------------------ addEvent("stormfront",true) addEventHandler("stormfront",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("stormfront.mp3") setSoundVolume(sound, 2.0) end end) ------------------------ addEvent("fireassis",true) addEventHandler("fireassis",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("fireassis.mp3") setSoundVolume(sound, 2.0) end end) ----------------------- addEvent("position",true) addEventHandler("position",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("position.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------- addEvent("regroup",true) addEventHandler("regroup",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("regroup.mp3") setSoundVolume(sound, 2.0) end end) ----------------------------- addEvent("com_go",true) addEventHandler("com_go",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("com_go.mp3") setSoundVolume(sound, 2.0) end end) ----------------------------- addEvent("fallback",true) addEventHandler("fallback",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("fallback.mp3") setSoundVolume(sound, 2.0) end end) --------------------------------------- addEvent("sticktog",true) addEventHandler("sticktog",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("sticktog.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------- addEvent("ct_backup",true) addEventHandler("ct_backup",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_backup.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------- addEvent("roger",true) addEventHandler("roger",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("roger.mp3") setSoundVolume(sound, 2.0) end end) --------------------------------- addEvent("negative",true) addEventHandler("negative",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("negative.mp3") setSoundVolume(sound, 2.0) end end) ---------------------------------- addEvent("com_reportin",true) addEventHandler("com_reportin",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("com_reportin.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------------ addEvent("ct_inpos",true) addEventHandler("ct_inpos",getRootElement(), function () if enabled == 1 then enabled = 0 local sound = playSound("ct_inpos.mp3") setSoundVolume(sound, 2.0) end end) ------------------------------------ addEvent("clear",true) addEventHandler("clear",getRootElement(), function () if enabled == 1 then enabled = 0 setTimer(enable,6000,1) local sound = playSound("clear.mp3") Link to comment
Kenix Posted February 1, 2011 Share Posted February 1, 2011 use debugscript 1-3 and outputChatBox("x event working") 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