No categories assigned

LUA:SetPlayerLevel

LUA - SetPlayerLevel

Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker


LUA Functions: SetPlayerLevel()

Sets the players level


Syntax

SetPlayerLevel(param1, param2)


Parameters

Required - param1 (Spawn), param2 (int8)
param1 is the player whos level we want to set
param2 is the new level


Usage

function hailed(NPC, Spawn)
    if IsPlayer(Spawn) then
        SetPlayerLevel(Spawn, 50)
    end
end

When the NPC is hailed it will set the players level to 50

Notes

Can only be used on players, for NPC's see SpawnSet