Bean666 Posted April 19, 2015 Posted April 19, 2015 (edited) is there anyway that this command will only work in a skin ID Which is 179? help please and is there also a way if the player shoots he loses his invisibility , thanks function toggleInvis ( thePlayer ) if getElementAlpha( thePlayer ) == 255 then setElementAlpha ( thePlayer, 0 ) else setElementAlpha ( thePlayer, 255 ) end end addCommandHandler ( "invis", toggleInvis ) Edited April 19, 2015 by Guest Aftermath
ALw7sH Posted April 19, 2015 Posted April 19, 2015 function invisible() if getElementModel(localPlayer) == 179 then setElementAlpha(localPlayer, 0) end end addCommandHandler ( "invisible", invisible )
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 (edited) removed Edited April 19, 2015 by Guest Aftermath
Walid Posted April 19, 2015 Posted April 19, 2015 use onClientPlayerDamage() Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 not that walid , that function is when he gets dmge , i wan't if he shoots he loses his invisibility. Aftermath
WhoAmI Posted April 19, 2015 Posted April 19, 2015 Leave your script s-side and use this c-side: addEventHandler ( "onClientPlayerWeaponFire", root, function ( ) setElementAlpha ( source, 255 ); end );
Walid Posted April 19, 2015 Posted April 19, 2015 Leave your script s-side and use this c-side: addEventHandler ( "onClientPlayerWeaponFire", root, function ( ) setElementAlpha ( source, 255 ); end ); the source of this event is the weapon that was fired. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
WhoAmI Posted April 19, 2015 Posted April 19, 2015 Are you drunk? The source of this event is the streamed in player who fired the weapon.
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 function invisible() if getElementModel(localPlayer) == 179 then setElementAlpha(localPlayer, 0) end end addCommandHandler ( "invisible", invisible ) is there anyway that if i do the /invisible command again ill go back to the alpha 255? and btw Whoami it worked ty. Aftermath
Walid Posted April 19, 2015 Posted April 19, 2015 (edited) function invisible() if getElementModel(localPlayer) == 179 then setElementAlpha(localPlayer, 0) end end addCommandHandler ( "invisible", invisible ) is there anyway that if i do the /invisible command again ill go back to the alpha 255? and btw Whoami it worked ty. use getElementAlpha () Example function invisible() if getElementModel(localPlayer) == 179 then if getElementAlpha (localPlayer) == 255 then setElementAlpha(localPlayer, 0) else setElementAlpha(localPlayer, 255) end end end addCommandHandler ( "invisible", invisible ) Edited April 19, 2015 by Guest Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
ALw7sH Posted April 19, 2015 Posted April 19, 2015 function invisible() if getElementModel(localPlayer) == 179 then if getElementAlpha ~= 255 then setElementAlpha(localPlayer, 255) else setElementAlpha(localPlayer, 0) end end end addCommandHandler ( "invisible", invisible )
WhoAmI Posted April 19, 2015 Posted April 19, 2015 function invisible ( player ) if ( getElementModel ( player ) == 179 ) then local n = ( getElementAlpha ( player ) > 0 ) and 0 or 255; setElementAlpha ( player, n ); end end addCommandHandler ( "invisible", invisible )
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 ok wait EDIT: Doesnt work guys i don't get invisibility. Aftermath
WhoAmI Posted April 19, 2015 Posted April 19, 2015 Which code do you use and in what side (client/server)?
Walid Posted April 19, 2015 Posted April 19, 2015 post full code here Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Walid Posted April 19, 2015 Posted April 19, 2015 im using client. try to use my code WhoAmI code is server side. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
WhoAmI Posted April 19, 2015 Posted April 19, 2015 function invisible ( ) if ( getElementModel ( localPlayer ) == 179 ) then local n = ( getElementAlpha ( localPlayer ) > 0 ) and 0 or 255; setElementAlpha ( localPlayer, n ); end end addCommandHandler ( "invisible", invisible ) Use it client
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 whoami your code work , thank you. Aftermath
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 oh i have more one favor haha , is it also possible when a player falls , he gets no damage? Aftermath
WhoAmI Posted April 19, 2015 Posted April 19, 2015 addEventHandler ( "onClientPlayerDamage", localPlayer, function ( _, id ) if ( id == 54 ) then -- 54 is the fall id. cancelEvent ( ); end end ); Also client-side.
Bean666 Posted April 19, 2015 Author Posted April 19, 2015 can u also make it for skin 179? Aftermath
WhoAmI Posted April 20, 2015 Posted April 20, 2015 addEventHandler ( "onClientPlayerDamage", localPlayer, function ( _, id ) if ( id == 54 and getElementModel ( localPlayer ) == 179 ) then -- 54 is the fall id. cancelEvent ( ); end end );
Tekken Posted April 20, 2015 Posted April 20, 2015 Server function toggleInvis(thePlayer) local id = getElementModel(thePlayer) if id == 179 then local alpha = getElementAlpha(thePlayer) if alpha == 255 then setElementAlpha(thePlayer, 0) else setElementAlpha(thePlayer, 255) end else setElementAlpha(thePlayer, 255) end end addCommandHandler("invis", toggleInvis) Client function showOnShoot() setElementAlpha(source, 255) end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), showOnShoot) Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now