Jump to content

HELP URGENT PLEASE!


waqaarali

Recommended Posts

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...