Jump to content

Enargy,

Members
  • Posts

    1,102
  • Joined

Everything posted by Enargy,

  1. or simply you just get original position of the text local sx, sy = guiGetScreenSize(); x, y = (sx/800), (sy/600) dxDrawText("AoB", sx*271, sy*500, 50, 50, ...)
  2. linea 63. guiSetVisible(guiVip, true) EDIT: El evento debe estar debajo de la función panel
  3. Olvidaste cerrar el paréntesis en la linea 64 en clientside triggerServerEvent( "darRegalo", getLocalPlayer() )
  4. client function playerUseItem(itemName, itemInfo) if itemInfo == "Beber" then playSound("sounds/effects/action_drink.ogg") triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "thirst") elseif itemInfo == "Comer" then triggerServerEvent("onSonidoRecibido", getRootElement(), getLocalPlayer()) triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "food") elseif itemInfo == "Usar Skin" then playSound("sounds/roupa.wav") triggerServerEvent("onPlayerChangeSkin", getLocalPlayer(), itemName) elseif itemName == "Empty Water Bottle" then triggerServerEvent("onPlayerRefillWaterBottle", getLocalPlayer(), itemName) playSound("sounds/effects/action_refill.ogg") elseif itemName == "Tent" then triggerServerEvent("onPlayerPitchATent", getLocalPlayer(), itemName) playSound("sounds/effects/action_tentunpack.ogg") elseif itemInfo == "Usar" then triggerServerEvent("onPlayerBuildAWireFence", getLocalPlayer(), itemName) elseif itemName == "Roadflare" then triggerServerEvent("onPlayerPlaceRoadflare", getLocalPlayer(), itemName) elseif itemInfo == "Развести огонь" then if getElementData ( localPlayer, 'Wood Pile' ) > 0 then triggerServerEvent("onPlayerMakeAFire", getLocalPlayer(), itemName) playSound("sounds/fosforo.mp3") else triggerEvent("displayClientInfo", getLocalPlayer(), "Box of Matches", "I need Wood Pile", 22, 255, 0) end elseif itemInfo == "Использовать" or itemInfo == "Use" then playSound("sounds/usemedkit.wav") triggerServerEvent("onPlayerUseMedicObject", getLocalPlayer(), itemName) elseif itemName == "Bandage" then triggerServerEvent("onPlayerUseMedicObject", getLocalPlayer(), itemName) elseif itemInfo == "Use Googles" then triggerServerEvent("onPlayerChangeView", getLocalPlayer(), itemName) elseif itemInfo == "Взять основное оружие" then playSound("sounds/equip2.wav") triggerServerEvent("onPlayerRearmWeapon", getLocalPlayer(), itemName, 1) elseif itemInfo == "Взять дополнительное оружие" then playSound("sounds/equip1.wav") triggerServerEvent("onPlayerRearmWeapon", getLocalPlayer(), itemName, 2) elseif itemInfo == "Взять специальное оружие" then playSound("sounds/equip3.wav") triggerServerEvent("onPlayerRearmWeapon", getLocalPlayer(), itemName, 3) end end addEvent("onClienteSonidoRecibido", true) addEventHandler("onClienteSonidoRecibido", resourceRoot, function(x,y,z) local sound = playSound3D("sounds/effects/action_eat.ogg", x, y, z, false) setSoundMaxDistance(sound, 15) setSoundVolume(sound, 0.4) triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "food") end) server addEvent("onSonidoRecibido", true) addEventHandler("onSonidoRecibido", resourceRoot, function(player) local x,y,z = getElementPosition(player) triggerClientEvent(player,"onClienteSonidoRecibido", getRootElement(),x,y,z) end)
  5. Linea 33 if ( source == getLocalPlayer() ) then --tu codigo end O simplemente colocas el showCursor y guiSetVisible solamente, ya que no es necesario definir al player.
  6. -- SERVER addEvent("onSonidoRecibido", true) addEventHandler(" onSonidoRecibido", resourceRoot, function() local x,y,z = getElementPosition(source) triggerClientEvent(source,"onClienteSonidoRecibido", getRootElement(),x,y,z) end) -- CLIENTE function playerUseItem(itemName, itemInfo) if itemInfo == "Comer" then triggerServerEvent("onSonidoRecibido", localPlayer) triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "food") end end addEvent("onClienteSonidoRecibido", true) addEventHandler(" onClienteSonidoRecibido", resourceRoot, function(x,y,z) local sound = playSound3D("sounds/effects/action_eat.ogg", x, y, z, false) setSoundMaxDistance(sound, 15) setSoundVolume(sound, 0.4) triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "food") end) Usa esto, lo hice desede el cel por si hay un cosa mal escrita
  7. Cambia source por getLocalPlayer() en la linea 3, al parecer source no esta definido como el jugador.
  8. Enargy,

    [Rol] Sistema

    ¿Como puedo saber si 'other' devuelve un elemento de jugador? Perdona por mi gran ignorancia Usa outputs para comprobar si other no sea false.
  9. Enargy,

    [Rol] Sistema

    Puedes echarle un vistazo a mi Coinsystem que es practicamente la misma finalidad que el dinero del juego, estoy en el phone pero puedes editarlo a tu preferencia.
  10. No siempre es necesario tener el clientside si el error esta en serverside.
  11. Puedes verificar que cuando alguien tiene el nivel que requiere: if ( getElementData( source, "PZ" ) > 100 ) then -- la cantidad de dinero usando givePlayerMoney end
  12. Donde utilizo esto? en un script de server o client? o con el runcode? Serverside o runcode. una de las dos maneras...
  13. Quizás hicieron el nombre con espacios " " te sugiero que borres todas las gangs y luego las vuelves a crear
  14. it should be work fine. post your Register code.
  15. function regPlayer(registerUsername, registerPassword) if registerUsername ~= "" then if registerPassword ~= "" then local account = addAccount(registerUsername,registerPassword) if account then triggerClientEvent(source,"hideMenu",getRootElement()) outputChatBox("You have successfully registered!", source) else outputChatBox("There was an error! Please contact an administrator!", source) end end end end addEvent("acceptRegister",true) addEventHandler("acceptRegister",getRootElement(),regPlayer)
  16. change logIn( source, loggingUsername, loggingPassword ) to: logIn( source, account, loggingPassword )
  17. Borra esto. local barrased local barrahambre
  18. Enargy,

    Help!

    Still not working Not work because you'll never did ACL groups named Anarquia and Alianza, should be created in ACL. EDIT: your code in itself works.
  19. as Walid told you, do you find this? --SERVER function onDeath() local my_position = {getElementPosition( source )}; local playerSpawn = setTimer(spawnPlayer, 2000, 1, source, unpack(my_position) ); if playerSpawn then triggerClientEvent(source, "openGUI", source); takeAllWeapons ( source ); end end addEventHandler("onPlayerWasted", getRootElement(), onDeath) -- CLIENT function spawnSystem() outputChatBox("I am respawning") end addEvent("openGUI", true) addEventHandler("openGUI", getRootElement(), spawnSystem) otherwise I tried your code with outputs and it works perfectly. i don't know but it might be your spawnSystem function
  20. why did you removed the code? this can help people who are just starting scripting. if you believe that anyone thinks steal your code the don't post it
  21. Enargy,

    killZombie

    try this addEventHandler("onPlayerDamage",root, function(attacker, weapon) if getElementType(source) == "player" then if type(attacker) == "ped" then if ( getPedWeapon(attacker) == 8 and getElementData (source, "zombie") == false ) then killPed(source, attacker, weapon) outputChatBox("true", source) end end end end)
×
×
  • Create New...