Jump to content

outputChatBox


S3M

Recommended Posts

What do i wrong.

Why not outputchat working? i see no errors in console.

function nightstick(thePlayer) 
      local skin = getElementModel ( thePlayer ) 
     if skin == 280 or skin == 281 or skin == 282 or  
            skin == 283 or skin == 284 or skin == 285 or  
            skin == 286 or skin == 288 then  
         giveWeapon(thePlayer, 3, 100, 1)   
    else 
         outputChatBox("You take the nightstick!", thePlayer, 255, 0, 0) 
    end 
end 
addCommandHandler("stick", nightstick) 

Thx.

Link to comment

Server

  
Skin = { 
[280] = true, 
[281] = true, 
[282] = true, 
[283] = true, 
[284] = true, 
[285] = true, 
} 
function nightstick(thePlayer) 
     local skin = getElementModel ( thePlayer ) 
     if Skin[skin] then 
          giveWeapon(thePlayer, 3, 1) 
     else 
          outputChatBox("You take the nightstick!", thePlayer, 255, 0, 0) 
     end 
end 
addCommandHandler("stick", nightstick) 
  
  

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