• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Player Check error

luhfe

New Member
Joined
Apr 26, 2018
Messages
48
Reaction score
2
Good evening, how do I search the database to return a column value !?
Example:
I want to check if the value of the VipC column (located in Accounts) of the player that is logging (Onlogin) is at 4, and then modifies it to 6.
 
Select vipc from accounts where id = loggedinaccountid

Throug lua you can get player:getAccount or similar...
 
Creaturescript i want make a check system to a 3 days vip free... becouse i try every1 in forums and dont work to me so i think in
some like that

Lua:
Function OnLogin(player)

If player:(field in database  - players.onlinetime) < 1 and player:(field in database - accounts.VipC) ~=1 then
player:addVipdays(days)
player: CHANGE(field in database - accounts.VipC) to 1 -- (thats i'll use to check in next login to do not dup bonus days)
player: MSG informative
else
player:msg informative
end

=\
 
Back
Top