-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Of course, it is just adding more time for wanted levels. I only can't find the timer that drops the wanted level. But is this all? Can you show me where you got this? (Then I can take a closer look.)
-
nope. Btw this timer doesn't drop the wantedLevel, where is that part?
-
See line "32" there you can set up the time (5000 ms /5 sec) local wantedLevels = getPlayerWantedLevel ( source) local wantedTime = wantedLevels * 5000 if wantedTime > 50 then -- set the timer or do what you want. end
-
Identify Mortal Strike with knife in "KILL_Knife_Player"
IIYAMA replied to ronaldoguedess's topic in Scripting
Why waste the source? why waste data? The source isn't a parameter, it something that get created automatic when an event got trigged. function onStealthKill(source, targetPlayer) triggerServerEvent("onPedGetsKilledStealthKill", source, targetPlayer) end addEventHandler("onClientPlayerStealthKill", getLocalPlayer(), onStealthKill) function PedKilledgggg(targetPlayer) if isElement(source) then setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) end end addEvent("onPedGetsKilledStealthKill", true) addEventHandler("onPedGetsKilledStealthKill", getRootElement(), PedKilledgggg) Also:(bugged) setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) setElementData(source, "Pedkilled", (getElementData(source, "Pedkilled")or 0) + 1) BTW: If you don't do anything extra clientside, then do it serverside, as you did first. https://wiki.multitheftauto.com/wiki/On ... tealthKill -
My script looks like that, except it is more to sync the player movement and damage. I don't kick players for lagg, I kill them. It even uses tables to manage player their health so no other things can change values from it. It is one of the biggest reasons why my servers don't have players, because the less lagg you have the better you can damage others elements. But I don't really care, the scripting is more fun then the use of it.
-
@1w#ALBANDER Some lagg can't be prevent with that (especially short timed outs), they come close to cheating but they are more or less gone for some time and always show up at the wrong time and place. mtasa://85.159.113.61:22014 Or click on the servers in my signature.
-
It means getting 10% from 0 euro donations and yes that is very funny.
-
Danny, thank you very much! It works great! Bandi thanks for explaining about the camera rotation. It seems it didn't needed the Y rotation after all. Also thanks to everybody that replied on this topic.
-
You also can try to use a timer to reset the nitro count.
-
As far as I know. local blip = exports.customblips:createCustomBlip ( x, y,32, "images/player.png", 50 )
-
and what if you set the count before activating the nitro?
-
Yes that is possible. -- server addVehicleUpgrade(vehicle, 1010) triggerClientEvent(root,"infinityNitro",vehicle) -- client addEvent("infinityNitro",true) addEventHandler("infinityNitro",root, function () if isElement(source) then setVehicleNitroActivated ( source, true ) setVehicleNitroCount (source,101 ) end end)
-
https://wiki.multitheftauto.com/wiki/Se ... oActivated https://wiki.multitheftauto.com/wiki/Se ... NitroCount
-
[Help with Map Editor] Please help me to fix this bug.
IIYAMA replied to JustToQuestion's topic in Support
(1) Select one of the objects. (2) Press f3. (3) Scroll down till you see alpha. Set alpha to 0. (4) Click OK and there you are. You can set the rotation, position, interior ,dimension. You can also set collision enable or disable. You can set the size of it. (but you can't scale the collision) etc. I hope I did answer you question. -
Start freeroam. (if you haven't done that) Click on "map" and under the gta san map, you can see your position.
-
You won't learn anything from the zombie script unless you know the basic. That is biggest mistake from all the starters.... Take my advice and go study the wiki mta samples. You will learn the most of these. These pages will show you most of the samples. https://wiki.multitheftauto.com/wiki/Cl ... _Functions https://wiki.multitheftauto.com/wiki/Cl ... ing_Events https://wiki.multitheftauto.com/wiki/Se ... _Functions https://wiki.multitheftauto.com/wiki/Se ... ing_Events And don't just go mix up code, just try to find out the structure of how it is builded up. Good luck!
-
Hello people, I am at the moment busy with my own enemy ped system. But I having a big sync bug problem with it. One 1 ped is actually shooting, the others are just firing blanks..... And the very bad thing about it is that it is all happening with the syncer, no other players are in the server. (some times 2 peds are synced correctly but that doesn't happen often) See screenshot. Anybody has reported a bug like this? or know how to prevent this? It is very said that 1 player can only sync 1 ped with correct results.... Do I need to enable sync bullets or doesn't that work for peds?
-
Doesn't work when a ped is in a vehicle. https://wiki.multitheftauto.com/wiki/OnClientExplosion
-
Sorry but this is more requesting to edit property from unknown people. He should come here to fix it for you, not the hard working scripters from the community.
-
Don't forget to make your variables local, especially when you use render functions. It simply will start lagging if you don't. local renderHud = function () local munitie = getPedTotalAmmo ( localPlayer) local clip = getPedAmmoInClip ( localPlayer) local IDarma = getPedWeapon(localPlayer) local arma = getWeaponNameFromID(IDarma) local viata = getElementHealth (localPlayer) local armura = getPedArmor (localPlayer) local bani = getPlayerMoney()-- "thePlayer" this shouldn't be there. -- put your dx stuff here-- -------------------------------- end local handler = true addEventHandler("onClientRender",root,renderHud) addCommandHandler("showhud", function () if handler then removeEventHandler("onClientRender",root,renderHud) handler = false else addEventHandler("onClientRender",root,renderHud) handler = true end end)
-
Cause ElementData is attached on an element. When this player/element leaves, the element is gone and so is the data. Elements are actuality in lua expressed as user-data. Every element does have it's own user-data, they are build up out several numbers and letters. When a player leaves the server his user-data can be saved at the server, but when he rejoins his user-data has been changed. But you can use the player account (or serial) instead.
-
For what I created: "onClientResourceStart" "onClientRender" "onPlayerSpawn" triggerClientEvent table = {} getNetworkStats getDistanceBetweenPoints3D getTickCount and much more... for a working a script, that's keeping up the performance of your internet speed. At the moment I am busy with something similar to combination of slothbot and dayZ, I don't have time to guide you, sorry.
-
Ah, you are hunting for free scripts... I know because I already fixed it and shared it with the poster. So yes a bit late,
