• Pointshop: Function multiple lines error
    2 replies, posted
Hey, please help me! I am trying to make a item that does multiple things [CODE] function ITEM:OnBuy(ply) if ply:IsValid() then PrintMessage( HUD_PRINTTALK, "Look its " .. ply.GetName() .. " He just bought something? Wow" ) elseif ply:Alive() then ply:PS_GiveItem('conehat') else end[/CODE] I need help, it seems not to work. Like I want it the player buys it, receives it and a message is sent in chat? Help!
ply:Nick() instead of ply.GetName()
[CODE]function ITEM:OnBuy(ply) if ply:IsValid() then PrintMessage( HUD_PRINTTALK, "Look its " .. ply:Nick() .. " He just bought something? Wow" ) ply:PS_GiveItem('conehat') end end [/CODE] should work, didn't test it.
Sorry, you need to Log In to post a reply to this thread.