-
Posts
207 -
Joined
-
Last visited
Everything posted by DarkByte
-
Thanks buddeh
-
Hello...i wonder why this script is giving me errors and :~..It seems fine to me. Maybe you can help me out
-
kills/death. 3402/2432 = 1.39 K/D 3402 - kills 2432 - deaths
-
The original is with vehicle, but i've edited it to get the weapon creator......
-
Hello. I've found this script to detect the weapon (hs rocket/ rocket). If the rocket hits col shape it will output the creator but it doesn't work addEventHandler("onClientColShapeHit",root, function(element) local weapon = getPedWeapon(g_Me); if weapon and g_Rockets[source] and g_Rockets[source][2] and (element == weapon) and (g_Rockets[source][2] ~= weapon) then if isTimer(resetTimer) then killTimer(resetTimer); end MyKiller = getProjectileCreator(g_Rockets[source][2]); setTimer(resetKiller,20000,1); outputChatBox(getPlayerName(MyKiller)); end end) addEventHandler("onClientProjectileCreation",root, function(creator) local x,y,z = getElementPosition(source); local detector = createColSphere(x,y,z,6); g_Rockets[detector] = {source,creator}; end)
-
Found this, but how to manage it an get it to a color? local function wavelengthToRGBA(length) local r, g, b, factor if (length >= 380 and length < 440) then r, g, b = -(length - 440)/(440 - 380), 0, 1 elseif (length < 489) then r, g, b = 0, (length - 440)/(490 - 440), 1 elseif (length < 510) then r, g, b = 0, 1, -(length - 510)/(510 - 490) elseif (length < 580) then r, g, b = (length - 510)/(580 - 510), 1, 0 elseif (length < 645) then r, g, b = 1, -(length - 645)/(645 - 580), 0 elseif (length < 780) then r, g, b = 1, 0, 0 else r, g, b = 0, 0, 0 end if (length >= 380 and length < 420) then factor = 0.3 + 0.7*(length - 380)/(420 - 380) elseif (length < 701) then factor = 1 elseif (length < 780) then factor = 0.3 + 0.7*(780 - length)/(780 - 700) else factor = 0 end return r*255, g*255, b*255, factor*255 end
-
I've tried onClientVehicleDamage, but it doesn't detect the rocket.
-
Then how the shooter gamemode gets the killer?
-
I want to make it serversided, and need some halp HB btw
-
I've been searching and found this script. I tried to implement it in killmessages but failed, maybe you can help me? addEventHandler("onPlayerDamage", root, function(attacker, attackerWeapon, bodyPart, loss) -- Last Attacker if (isElement(attacker) and getElementType(attacker) == "vehicle") then -- Get Driver for Vehicle Attackers attacker = getVehicleOccupant(attacker) --outputChatBox(getPlayerName(attacker)) end lastAttacker[source] = attacker or false lastAttackerWeapon[source] = attackerWeapon or false lastDMG[source] = math.floor(loss) if (lastAttacker[source]) then lastVictim[attacker] = source lastAttack[attacker] = getTickCount() end end )
-
It's working, but I've achieved that earlier. The thing i want is: if the victim is in vehicle to get the weapon which vehicle got blown by....but in this version it shows that the player killed himself not killed by a player
-
Ok, thanks for reply. But How to get the one who created projectile? I know it's getProjectileCreator, but how to implement it in killmessages..
-
Hello. Since the default killmessages won't show how to get the killer if you're in a vehicle. I mean if you're in a vehicle and someone shoots a rocket/hs rocket/hydra rocket or tank it show that you killed yourself. Can someone give me some advices?
-
Mai bine spus CLONEZ Grafuroam
-
It's replacing, same errors in debug and every time i spawn they replace
-
Still got same messages in debug.
-
280 mbs for mods, no Could you fix my code? I got a lot of errors