Flipi Posted August 25, 2013 Posted August 25, 2013 No logro adecuarlo para solo admins local shootTimer = nil function shoot() local accountName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "admin" ) ) ) then local vehicle = getPedOccupiedVehicle(player) if not isElement(vehicle) then return end if(not isTimer(shootTimer))then local posX, posY, posZ = getElementPosition(vehicle) shootTimer = setTimer(function()end, 3333, 1) createProjectile(vehicle, 19, posX, posY, posZ, 1.0) end end bindKey("vehicle_fire", "down", shoot) bindKey("vehicle_secondary_fire", "down", shoot)
FraN-724 Posted August 25, 2013 Posted August 25, 2013 Estas mesclando client side con server side, para privatizar usa mejor triggerServerEvent o para lanzar el misil usa triggerClientEvent
Flipi Posted August 25, 2013 Author Posted August 25, 2013 Estas mesclando client side con server side, para privatizar usa mejor triggerServerEvent o para lanzar el misil usa triggerClientEvent pero entonces tendria que cambiar todo, que me da lata hacerlo de nuevo ?
FraN-724 Posted August 25, 2013 Posted August 25, 2013 No, seria algo asi mas o menos. client: local shootTimer = nil function shoot(localPlayer) local vehicle = getPedOccupiedVehicle(localPlayer) if not isElement(vehicle) then return end if(not isTimer(shootTimer))then triggerServerEvent("chigualockowom", localPlayer) local posX, posY, posZ = getElementPosition(vehicle) shootTimer = setTimer(function()end, 3333, 1) createProjectile(vehicle, 19, posX, posY, posZ, 1.0) end end bindKey("vehicle_fire", "down", shoot) bindKey("vehicle_secondary_fire", "down", shoot) server: addEvent("chigualockowom", true) function lala(player) local accountName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then end end addEventHandler("chigualockowom", root, lala) PD: No testeado
Flipi Posted August 25, 2013 Author Posted August 25, 2013 Error en el debug? no sale error, solo que no funca
FraN-724 Posted August 25, 2013 Posted August 25, 2013 Intenta cambiar el nombre de la acl a un grupo en el que estés. ¿Estas seguro que estas logeado?
Flipi Posted August 25, 2013 Author Posted August 25, 2013 Intenta cambiar el nombre de la acl a un grupo en el que estés. ¿Estas seguro que estas logeado? si, si me logeo pero no funca, intenta probarlo tu y me muestras como lo tienes.
FraN-724 Posted August 25, 2013 Posted August 25, 2013 Disculpa? pero de quien es el script ,mio o tuyo?, haz el intento de arreglarlo tú también, nunca dependas de los demás.
Flipi Posted August 25, 2013 Author Posted August 25, 2013 Disculpa? pero de quien es el script ,mio o tuyo?, haz el intento de arreglarlo tú también, nunca dependas de los demás. ah dle, perdón entonces, es que estaba haciendo otras cosas tambien , gracias por todo
EstrategiaGTA Posted August 25, 2013 Posted August 25, 2013 No, seria algo asi mas o menos.client: local shootTimer = nil function shoot(localPlayer) local vehicle = getPedOccupiedVehicle(localPlayer) if not isElement(vehicle) then return end if(not isTimer(shootTimer))then triggerServerEvent("chigualockowom", localPlayer) local posX, posY, posZ = getElementPosition(vehicle) shootTimer = setTimer(function()end, 3333, 1) createProjectile(vehicle, 19, posX, posY, posZ, 1.0) end end bindKey("vehicle_fire", "down", shoot) bindKey("vehicle_secondary_fire", "down", shoot) server: addEvent("chigualockowom", true) function lala(player) local accountName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then end end addEventHandler("chigualockowom", root, lala) PD: No testeado ¿Dónde está el evento "chigualockowom"?
Sensacion Posted August 25, 2013 Posted August 25, 2013 estás provocando "chigualockowom" pero de todas maneras se creará el proyectil
Recommended Posts