
AnnaBelle
Members-
Posts
88 -
Joined
-
Last visited
Everything posted by AnnaBelle
-
function greetingHandler () setElementData(source, "MAX_Slots", 50) setElementData(source, "M4", 1) setElementData(source, "DMR", 1) setElementData(source, "PDW", 1) setElementData(source, "Hunting Knife", 1) setElementData(source, "Milk", 5) setElementData(source, "Cooked Meat", 5) setElementData(source, "M4 Mag", 90) setElementData(source, "DMR Mag", 10) setElementData(source, "PDW Mag", 90) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), greetingHandler ) function greeting2Handler () setElementData(source, "Desert ghillie Suit", 1) setElementData(source, "Night Vision Goggles", 1) setElementData(source, "Infrared Goggles", 1) setElementData(source, "Map", 1) setElementData(source, "Box of Matches", 1) setElementData(source, "Watch", 1) setElementData(source, "GPS", 1) setElementData(source, "Toolbox", 1) setElementData(source, "Radio Device", 1) end addEvent( "onGreeting2", true ) addEventHandler( "onGreeting2", getRootElement(), greeting2Handler ) addEvent("ClientHaveLevel",true) addEventHandler("ClientHaveLevel",getRootElement(),function() local account = getPlayerAccount(source) local accName = getAccountName(account) if(isObjectInACLGroup("user."..accName,aclGetGroup("VIP")))then local time = getRealTime() local dataTime = getAccountData(account,"vip.time") if(dataTime)then if(dataTime + 1800 < time.timestamp)then -- 30 minutes setAccountData(account,"vip.time",time.timestamp) else outputChatBox( "Use this command after 30 minutes!",source,255,255,255,true) return end else setAccountData(account,"vip.time",time.timestamp) end triggerClientEvent(source,"ShowVipPanel",source) else outputChatBox("U DON'T HAVE VIP DO USE THIS COMMAND",source,255,255,255,true) end end)
-
local screenX, screenY local drawTimer local isDrawing = false local sound function drawHitMarker() dxDrawImage(screenX-16,screenY-16,32,32,"hitmarker.png") end addEventHandler("onClientPlayerWeaponFire",localPlayer, function(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if hitElement then if getElementType(hitElement)== "vehicle" or getElementType(hitElement)== "player" then screenX, screenY = getScreenFromWorldPosition(hitX, hitY, hitZ) if not screenX then return end if isDrawing then return end isDrawing = true local sound = playSound("hitmarker-sound.wav") setSoundVolume( sound , 1) addEventHandler("onClientRender", root,drawHitMarker) if drawTimer and isTimer(drawTimer) then killTimer(drawTimer) end drawTimer = setTimer(function() isDrawing = false removeEventHandler("onClientRender",root,drawHitMarker) end, 500, 1) end end end) addEventHandler("onClientPlayerDamage",getLocalPlayer(),function() fadeCamera(false,1,255,0,0) local hit_sound = playSound("hitmarker-sound.wav") setSoundVolume(hit_sound,0.5) function cam() fadeCamera(true,1) end setTimer(cam,150,1) end) I explain ... when I shoot it runs "onClientPlayerWeaponFire" And if that bullet hits a ped, user or auto it generates this image at the point of impact " dxDrawImage(screenX-16, screenY-16, 32, 32, "hitmarker.png")" There is a problem with ping. I can shoot you but you do not get the bullet, the script does not verify that, what I want is that something like an IF asks you if you received damage before Which generates the image ... osea syncronize the 2 parts. This because in users occasions they shoot others and when they see the X they think that they did and it is not true then they complain of hack or abuse.
-
local screenX, screenY local drawTimer local isDrawing local sound function drawHitMarker() dxDrawImage(screenX-16, screenY-16, 32, 32, "hitmarker.png") end addEventHandler("onClientPedDamage", getRootElement(), function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if hitElement then if getElementType(hitElement)== "vehicle" or getElementType(hitElement)== "player" then screenX, screenY = getScreenFromWorldPosition(hitX, hitY, hitZ) if not screenX then return end if isDrawing then return end isDrawing = true local sound = playSound("hitmarker-sound.wav") setSoundVolume( sound , 1) addEventHandler("onClientRender", root, drawHitMarker) if drawTimer and isTimer(drawTimer) then killTimer(drawTimer) end drawTimer = setTimer(function() isDrawing = false removeEventHandler("onClientRender", root, drawHitMarker) end, 500, 1) end end end) Like this?
-
-
Thank you, next time I use (<>).
-
Player can buy VIP with play money for one day and after that one day VIP is automatically removed server: addEvent("addVIP",true) addEventHandler("addVIP",getRootElement(),function(source) local account = getPlayerAccount(source) local accName = getAccountName(account) aclGroupAddObject(aclGetGroup("VIP"),"user."..accName) end) Client: if source == Botao["buy8"] then if getElementData(localPlayer,"MoneyMT")MTA >= 150000 then triggerServerEvent("addVIP",getRootElement(),localPlayer) outputChatBox("You have vip for one day.",255,255,255,true) else outputChatBox("You do not have enough money",255,0,0,true) end end
-
thank you
-
ahh, fllw tava usando 'shared'
-
ERROR: [DayZ]\DayZ\menu_client.lua:12: attempt to call global 'guiCreateStaticImage' (a nil value) http://prntscr.com/ejv5hq help??
-
ERROR: [DayZ]\DayZ\menu_client.lua:12: attempt to call global 'guiCreateStaticImage' (a nil value) http://prntscr.com/ejv5hq Alguem pode tá me ajudando
-
você tambem está a procura deste tipo de sistema de level/patente... [http://prnt.sc/ejvory]