Elite Brasil
New Member
- Joined
- Nov 3, 2009
- Messages
- 92
- Reaction score
- 0
I need a script that removes the promotion so vipdays = 0
example: vipdays = 0 and transform promotion in 1
I tried to do a script did not work more
Could someone help?
example: vipdays = 0 and transform promotion in 1
I tried to do a script did not work more
onLogout function (cid)
if (db.getResult ("SELECT` promotion `FROM` players `WHERE` name `= '" .. getCreatureName (cid ).."';") == 2) THEN
if (db.getResult ("SELECT` vipdays `FROM` `WHERE accounts` name `= '" .. getPlayerAccount (cid ).."';") <1) then
db.executeQuery ("UPDATE` players `SET` promotion `= 1 WHERE` name `= '" .. getCreatureName (cid ).."';")
end
end
return TRUE
end
Could someone help?