waqaarali Posted August 23, 2013 Share Posted August 23, 2013 So I want to make a simple script and I made it but it don't really work I want it so when I type the command /give it only gives it to the specific player in the getPlayerFromName command I wrote please help someone! I don't know what side is it at the moment please help guys function hack ( randPlayer, commandName, weaponID, ammo ) local randPlayer = getPlayerFromName( Gangsta ) -- Get a the player Gangsta giveWeapon(randPlayer,35,100) -- Give them a rocket launcher with 100 rockets. setWeaponAmmo(randPlayer,35,50) -- Decide we're only going to give them 50 rockets. ----- But it don't work end addCommandHandler ( "give", hack ) Link to comment
waqaarali Posted August 23, 2013 Author Share Posted August 23, 2013 Btw guys this is not a hack or anything it's just a normal script for me, Link to comment
Markeloff Posted August 23, 2013 Share Posted August 23, 2013 function hack ( source, commandName, weaponID, ammo ) local name = getPlayerName ( source ) if name == "Gangsta" then giveWeapon(source,35,50) else outputChatBox ( "You aren't Gangsta", source ) end addCommandHandler ( "give", hack ) But make sure that players can change their nickname easily to Gangsta and get the weapon. If it is for you, use ACL then. Link to comment
waqaarali Posted August 23, 2013 Author Share Posted August 23, 2013 Also do you know how to make a script when you type a command you get admin I tried to make it but it don't work Link to comment
Dealman Posted August 23, 2013 Share Posted August 23, 2013 You need to use aclGroupAddObject for that. If you do this, the resource doing it will need ACL Admin Permission. Link to comment
BieHDC Posted August 23, 2013 Share Posted August 23, 2013 if you wanna make somebody admin then use Admin Panel because if somebody find out the command then...you know btw: i think you wanna embebbd the code in your scripts and if a server uploads it you can make yourself admin there 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