1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Notify Help

Discussion in 'DarkRP Modding Questions & Help' started by TommyBoiy, Jan 3, 2018.

  1. TommyBoiy

    TommyBoiy New Member

    Hey some im trying to create an entity that when you Use it, it will give you 100 pointshop2 credits and I'm lost on how to get the entity to create a DarkRP.Notify heres the script https://hastebin.com/dazapewifa.lua

    AddCSLuaFile( "cl_init.lua" ) -- Make sure clientside
    AddCSLuaFile( "shared.lua" ) -- and shared scripts are sent.

    include('shared.lua')

    function ENT:Initialize()

    self:SetModel( "models/props_lab/jar01a.mdl" )
    self:physicsInit( SOLID_VPHYSICS ) -- Make us work with physics,
    self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics
    self:SetSolid( SOLID_VPHYSICS ) -- Toolbox

    local phys = self:GetPhysicsObject()
    if (phys:IsValid()) then
    phys:Wake()
    end
    end

    function ENT:Use( ply )
    ply:pS2_AddStandardPoints(100)

    DarkRP.Notify(ply, 0, 10, "You picked up 100 points!")

    self:Remove()
    end
    end
    https://hastebin.com/dazapewifa.lua
     
    Last edited: Jan 3, 2018
  2. Sir Klutch

    Sir Klutch Active Member

Share This Page