• 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!

Points in game!

dervin13

Active Member
Joined
Apr 26, 2008
Messages
458
Solutions
1
Reaction score
28
Anyone can help me with one talkaction who player can see how much points they have in account??

Like !checkpoints.

And appear in game: You have 30 premium points.

ty
 
You need to do a talkactions what will get it from db smth like that
SQL:
'SELECT `premium_points` FROM `account`s WHERE `id` = ' ..AccID
I wont do it for u cuz u will never learn anything.
 
If i post here, i tried before!

If you dont wanna help, pls dont post!

ty

You need to do a talkactions what will get it from db smth like that
SQL:
'SELECT `premium_points` FROM `account`s WHERE `id` = ' ..AccID
I wont do it for u cuz u will never learn anything.
 
Code:
function onSay(cid, words, param)
	res = db.getResult('select premium_points from accounts where id = '..getPlayerAccountId(cid))
	if res:getID() ~= -1 then
		doPlayerPopupFYI(cid, 'You have '..res:getDataInt('premium_points') ..' premium points.')
	else
		doPlayerPopupFYI(cid, 'Database error, contact server administrator.')
	end
	return TRUE
end
 
Ty nsanee!

Like always you are helping a lot!

Code:
function onSay(cid, words, param)
	res = db.getResult('select premium_points from accounts where id = '..getPlayerAccountId(cid))
	if res:getID() ~= -1 then
		doPlayerPopupFYI(cid, 'You have '..res:getDataInt('premium_points') ..' premium points.')
	else
		doPlayerPopupFYI(cid, 'Database error, contact server administrator.')
	end
	return TRUE
end
 
Back
Top