-
Posts
6,056 -
Joined
-
Last visited
-
Days Won
208
Posts posted by IIYAMA
-
-
--SERVER SIDE!!! alreadyS = 0 function bind () bindkey ( source ,"x", "down", function(player, key, state) if currentWeaponID == 34 then if alreadyS == 0 then setPedStat ( player, 79, 300 ) alreadyS = 1 outputChatBox("Works", player, 255, 69, 0) else setPedStat ( player, 79, 999 ) alreadyS = 0 outputChatBox("works!!.", player, 255, 69, 0) end end end ) end addEventHandler ( "onPlayerJoin", getRootElement(), bind )
I am trying to change the stat of a sniper with the button X. (server side)
What did I do wrong?
-
Good camp,
But laggy players that can't drive...
-
See this:
add this there:
name = your name
Go ingame:
/register: IIYAMA pasword
pasword = your own password
/login IIYAMA pasword
Recommended:
write it in f8.
register: IIYAMA pasword
login IIYAMA pasword
(you don't have to use / in f8 and if you ever forgot to use: /, your pasword will not be a open book. (happend to me 1x )
-
yes know that bone_attach script. This will be to hard to make. I can't work with ultimate editor and also my virus scan put it in quarantain. thx for helping all, but I have to change my idea's. THX thx THX thx
-
Rofl CapY, that returns an INTEGER.
@IIYAMA: You can't set the visibility of a weapon since weapons aren't elements
You'll need a workaround.. You could maybe force his weapons off when the player visibility is changed and save his weapons and ammo in an array and once you've set his visibility back on then give the player his weapons back
Thx BinSlayer1, finnaly I got the right awnser. Also thx Capy for trying to help me.
grr stuppit mta...
-
yes but how do I get this weapon....
This weapon is in the hands of a player. It has not be made as a element. It is just the weapon...
-
yes how to get this element?
Because element is the weapon and not the ped.
getelementpedweapon lol
-
Nope, I am talking about the player his weapon not his name.
-
I have little problem.
I want to make a player really invisible(alpha 0). But I don't know how to set this ped/player his weapon to a element. Anybody have same problem or know how to do this.
Pls let me know.
Greetings IIYAMA
-
I've just finish creating a resource for it, here:
https://community.multitheftauto.com/index.php?p=resources&s=details&id=3178
Thx man! I will try it! Why that check version?
-
ummm, you forgot to add a colshape over the mine
That does not look, if a bullit hit the object I think.
-
I need a script that blow up the mine when you hit him and not just remove it. Also he must take the owner of the mine as creator of the explosion. Anybody can help me?
>Normal activation of mines when you walk over them.
:Server
addEvent ("poopoutthemine", true ) function laymine(player) local posx, posy, posz = getElementPosition ( player ) local landmine = createObject ( 1510, posx, posy, posz - .999, 0, 0, 3.18 ) local landminecol = createColSphere ( posx, posy, posz, 3 ) setElementData ( landminecol, "type", "alandmine" ) setElementData ( landminecol, "owner", player ) setElementData ( landmine, "type", "proximity" ) setElementParent ( landmine, landminecol ) end addEventHandler("poopoutthemine",getRootElement(),laymine) --DETECTS THE HIT function landminehit ( player, matchingDimension ) if ( getElementData ( source, "type" ) == "alandmine" ) then if ( getElementData ( player, "stealthmode" ) ~= "on" ) then local mineowner = getElementData ( source, "owner" ) local ownersteam = getPlayerTeam ( mineowner ) local victimteam = getPlayerTeam ( player ) if ownersteam ~= victimteam then --IS THIS PLAYER ON THE SAME TEAM AS THE GUY WHO PUT IT THERE? local posx, posy, posz = getElementPosition ( source ) createExplosion (posx, posy, posz, 8, mineowner ) setElementData ( source, "type", nil ) destroyElement ( source ) end end end end addEventHandler ( "onColShapeHit", getRootElement(), landminehit )
:Client
Not much importants
------------------------------------------------------------------------------------------------
>Activation of mines when you shoot them.
:Server
--KILLS THE MINE WHEN SHOT addEvent ("destroylandmine", true ) function destroymine(hitElement) if (hitElement) then local damagedmine = getElementParent ( hitElement ) destroyElement ( damagedmine ) end end addEventHandler("destroylandmine",getRootElement(),destroymine)
:Client
--TRIGGERS THE SERVER EVENT TO DESTROY A LAND MINE ONCE IT'S SHOT function weaponfired (weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if source == getLocalPlayer () then if (hitElement) then if ( getElementData ( hitElement, "type" ) == "proximity" ) then if minedelay ~= 1 then minedelay = 1 triggerServerEvent ("destroylandmine", getLocalPlayer (), hitElement ) endminedelay = setTimer ( minedelaystop, 400, 1, player ) end end end end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), weaponfired ) function minedelaystop() minedelay = 0 end
I have try everything to fix it, but I just script sinds 3 weeks and this step is to big for me to take.
plsssss HELP!! I will be very happy!!!!
Help pls!
in Scripting
Posted
warning: bindKey(source,'x','down',
bad argument: bindkey
Pls, if somebody knows how to fix this or do it on another way. Help me!