IIIIlllllIII Posted September 29, 2011 Share Posted September 29, 2011 hi solidsnake14 i make shop panel i still long time to make the shop panel and i have just a sample problem with it i make the shop just for buying the weapons and i wanna add more code like buy health and flip car and buy Invisible and FireBullets and all stuff where i find this stuff like buy health and Fire Bullets and invisible where i find that i cant find it on wiki wiki just give me example i cant find buy the health and invisible pleeeez help me or give me some code like buy health and invisible pleeez solidsnake14 i still 1 week sreaching for this codes and i find you helped al3grab to make has shop pleez help me and thank to you Link to comment
Castillo Posted September 29, 2011 Share Posted September 29, 2011 You won't find the code for everything in the wiki. To "buy" health use: setElementHealth. invisible can be setElementAlpha + setPlayerNametagShowing. Link to comment
IIIIlllllIII Posted September 29, 2011 Author Share Posted September 29, 2011 You won't find the code for everything in the wiki.To "buy" health use: setElementHealth. invisible can be setElementAlpha + setPlayerNametagShowing. thanks did you mean to buy health the code like that function hp ( sourcePlayer, targetPlayerName ) local targetPlayer = getPlayerFromNick ( targetPlayerName ) if targetPlayer then setElementHealth ( targetPlayer, getElementHealth(targetPlayer) 100 ) end end i changed the code i gett the code form wiki and i delete some lines did i do the true or i have a error on the code Link to comment
Cadu12 Posted September 29, 2011 Share Posted September 29, 2011 setElementHealth ( targetPlayer, getElementHealth(targetPlayer) 100 ) Wtf is that? Stop copy and paste from wiki. setElementHealth ( targetPlayer, 100 ) Link to comment
TAPL Posted September 29, 2011 Share Posted September 29, 2011 lol that because he think all scripting are from wiki. follow the Syntax and read what wiki are saying wiki is not just example, look at syntax and try to understand the function by yourself, that all what you need. Link to comment
IIIIlllllIII Posted September 29, 2011 Author Share Posted September 29, 2011 lol that because he think all scripting are from wiki.follow the Syntax and read what wiki are saying wiki is not just example, look at syntax and try to understand the function by yourself, that all what you need. wtf wtf man i cant understand the fucking syntax bool setElementAlpha ( element theElement, int alpha ) that that mean i try to understand that but i cant give me all code pleez server said and client for health and invisible and armur and repair pleeez Link to comment
Castillo Posted September 29, 2011 Share Posted September 29, 2011 That's pretty easy to understand... element = the element you want to set the alpha of, can be vehicles, objects, markers, players, peds. alpha = from 0 to 255. Link to comment
Cadu12 Posted September 29, 2011 Share Posted September 29, 2011 bool = it returns true/false element = https://wiki.multitheftauto.com/wiki/Element , if you use setElementAlpha with ped use SOURCE or PLAYER int = integer alpha = setElementAlpha(source, 0) if alpha then (bool true) outputChatBox("You got it with invisible") else (bool false) outputChatBox("ERROR ON INVISIBLE") end Link to comment
IIIIlllllIII Posted September 29, 2011 Author Share Posted September 29, 2011 (edited) >>>>>>??? Edited November 8, 2011 by Guest Link to comment
TAPL Posted September 29, 2011 Share Posted September 29, 2011 addEvent("toggleInvis",true) addEventHandler("toggleInvis",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1000) then takePlayerMoney(source,1000) setPlayerNametagShowing(source, false) setElementAlpha(source, 0) outputChatBox(getPlayerName(source) .." has bought invis $1000 !!!", 255, 255, 0, root) else outputChatBox("You Dont Have Money to buy invis",source) end end) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_22 ) then triggerServerEvent("toggleInvis",getLocalPlayer()) end end) Link to comment
IIIIlllllIII Posted September 29, 2011 Author Share Posted September 29, 2011 addEvent("toggleInvis",true) addEventHandler("toggleInvis",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1000) then takePlayerMoney(source,1000) setPlayerNametagShowing(source, false) setElementAlpha(source, 0) outputChatBox(getPlayerName(source) .." has bought invis $1000 !!!", 255, 255, 0, root) else outputChatBox("You Dont Have Money to buy invis",source) end end) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_22 ) then triggerServerEvent("toggleInvis",getLocalPlayer()) end end) thanks so mutch مشكور ويرحم الله والديك وجزاك الله خير ياصديقي Link to comment
TAPL Posted September 29, 2011 Share Posted September 29, 2011 mutch i forgot, you will need setTimer to back Nametag showing and back Alpha to normal ( you have to try do that by yourself ) Link to comment
IIIIlllllIII Posted September 29, 2011 Author Share Posted September 29, 2011 mutch i forgot, you will need setTimer to back Nametag showing and back Alpha to normal ( you have to try do that by yourself ) i dont wanna lett it back i wanna all the map be invisible no time to end and it is work but i wanna the armor i make all is good health and invisible is great but i wanna the armor where i find it and superbullit give me the code pleez Link to comment
Castillo Posted September 29, 2011 Share Posted September 29, 2011 Nobody's going to give you anything, start learning! Link to comment
NotAvailable Posted September 30, 2011 Share Posted September 30, 2011 mutch i forgot, you will need setTimer to back Nametag showing and back Alpha to normal ( you have to try do that by yourself ) i dont wanna lett it back i wanna all the map be invisible no time to end and it is work but i wanna the armor i make all is good health and invisible is great but i wanna the armor where i find it and superbullit give me the code pleez I'll help you a bit. But i'm not helping you with all your shit. I'll create a little test example if you want. Tell me what you need. Link to comment
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