Online Status
#1

I got an rp script and I want to create online status, I got the mysql row "Online"

But I dont know how to put it In script

I want it to update the row "Online" onplayerconnect to 1 And onplayerdisconnect to 0

How can I do it?
Reply
#2

SQL update query
Reply
#3

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
SQL update query
PHP код:
OnPlayerConnect 
new query[250];
    
mysql_format(MysqlConquerysizeof(query), "UPDATE `users` SET `Online`=1 WHERE `uid`=%s",
    
PlayerName(playerid));
    
mysql_tquery(MysqlConquery""""); 
Like That?
Reply
#4

When the player connects, you only know their name. Let them login and on success, update `Online` column.

Also string specifier requires apostrophes '%s' or when escaping input '%e'
Reply
#5

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
When the player connects, you only know their name. Let them login and on success, update `Online` column.

Also string specifier requires apostrophes '%s' or when escaping input '%e'
Thank you for the advice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)