Flipi Posted August 25, 2013 Share 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) Link to comment
FraN-724 Posted August 25, 2013 Share Posted August 25, 2013 Estas mesclando client side con server side, para privatizar usa mejor triggerServerEvent o para lanzar el misil usa triggerClientEvent Link to comment
Flipi Posted August 25, 2013 Author Share 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 ? Link to comment
FraN-724 Posted August 25, 2013 Share 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 Link to comment
Flipi Posted August 25, 2013 Author Share Posted August 25, 2013 Error en el debug? no sale error, solo que no funca Link to comment
FraN-724 Posted August 25, 2013 Share Posted August 25, 2013 Intenta cambiar el nombre de la acl a un grupo en el que estés. ¿Estas seguro que estas logeado? Link to comment
Flipi Posted August 25, 2013 Author Share 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. Link to comment
FraN-724 Posted August 25, 2013 Share 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. Link to comment
Flipi Posted August 25, 2013 Author Share 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 Link to comment
EstrategiaGTA Posted August 25, 2013 Share 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"? Link to comment
Sensacion Posted August 25, 2013 Share Posted August 25, 2013 estás provocando "chigualockowom" pero de todas maneras se creará el proyectil Link to comment
Flipi Posted August 25, 2013 Author Share Posted August 25, 2013 ya logré hacerlo gracias por todo chicos Link to comment
Recommended Posts