5150 Posted September 13, 2015 Share Posted September 13, 2015 so i have a script that places a ped (with specific skin), and places a pickup in front of it allowing you to change to that skin. i know addEventHandler allows you to get that skin once you touch the pickup, but is there a way to do addCommandHandler so i can password some of the skins? here is the script: zombiehunter767676767 = createPed(43,1461,1850,11, 360) setElementHealth(zombiehunter767676767, 10000) zombiehunterpickup767676767 = createPickup (1461,1851,10, 3, 1275, 10000 ) function zombiehunterskinpickup767676767 ( thePlayer ) setPedSkin ( thePlayer, 43 ) giveWeapon ( thePlayer, 22, 6, false ) setElementData ( thePlayer, "zombie", false ) end addEventHandler ( "onPickupUse", zombiehunterpickup767676767, zombiehunterskinpickup767676767 ) addEventHandler ("onPickupUse", getRootElement(), function (playerWhoUses) if (source == zombiehunterpickup767676767) then setPlayerNametagText (playerWhoUses, "" .. getPlayerName (playerWhoUses)) setElementData (playerWhoUses, "job", "farm") end end) Link to comment
KariiiM Posted September 13, 2015 Share Posted September 13, 2015 You want to use the addCommandHandler event,Oks but what do you mean by password some skins? Like letting them only for Staffs/ VIP players or someone else? About your first question, yes there's a way, if i understood you well, you want when you hit the pickup it don't set the skin automaticly but by an command? and you've to be inside this pickup to let the command working if not ,then explain more well ! Link to comment
5150 Posted September 13, 2015 Author Share Posted September 13, 2015 yes, i use CommandHandler to make passwords for bases, cars, etc... and i wanted to see if, when i walk over the pickup, it requires a command, or "password" to actually change to that skin. so basically i want players to have to do the / command to change to the skin, when they walk over the pickup does that make sense? Link to comment
KariiiM Posted September 13, 2015 Share Posted September 13, 2015 yes, i use CommandHandler to make passwords for bases, cars, etc... and i wanted to see if, when i walk over the pickup, it requires a command, or "password" to actually change to that skin.so basically i want players to have to do the / command to change to the skin, when they walk over the pickup does that make sense? It's possible, So you mean by saying "password" in this case, to do a custom words / numbers like an captcha it output in the chat the time you hit the pickup for example,if you typed it right then you'll use the skin if not then you will not wear the skin? Link to comment
5150 Posted September 13, 2015 Author Share Posted September 13, 2015 yes.... you know how you can use /open or /close for gates? /lock /unlock for cars? well i want something like /***** for the skin pickup. yes basically what you said 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