CyberShaman21
New Member
- Joined
- Dec 9, 2017
- Messages
- 52
- Reaction score
- 4
hi
i want give items on first login dependent of vocation
i make this code:
this part is wrong ?
i try make new player with 1 id vocation but dosent work
i want give items on first login dependent of vocation
i make this code:
Code:
local firstItems = {2050, 2382}
function onLogin(player)
if player:getLastLoginSaved() == 0 then
for i = 1, #firstItems do
player:addItem(firstItems[i], 1)
end
player:addItem(player:getSex() == 0 and 2651 or 2650, 1)
player:addItem(1987, 1):addItem(2674, 1)
if player:getVocation() == 1 then
player:addItem(2162, 1)
end
end
return true
end
Code:
if player:getVocation() == 1 then
player:addItem(2162, 1)
i try make new player with 1 id vocation but dosent work