- 0
Problema Last Login
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
1Shot
Salut. Vreau sa pun cand intri pe server si trebuie sa te loghezi sa iti apara: * Last Login: data/ora *. Problema este ca nu imi apare... apare asa: * Last Login: *
Adica pur si simplu data si ora nu apar... Nu stiu ce as fi putut face gresit, mie m-i se pare ca e totul ok... Va las mai jos scriptul:
La OnPlayerDisconnect: // LAST LOGIN new y,m,d,h,mi; getdate(y,m,d); gettime(h,mi); new str[184]; mysql_format(SQL,str,sizeof(str), "UPDATE users SET `lastOn`='%02d.%02d.%d - %02d:%02d' WHERE `name`='%s'",d,m,y,h,mi,PlayerInfo[playerid][pNormalName]); mysql_tquery(SQL,str,"",""); La OnPlayerRequestClass: if (gPlayerAccount[playerid] != 0) { new LastLog[64], loginstring[128]; cache_get_field_content(playerid, "lastOn", LastLog); format(loginstring,sizeof(loginstring), "Welcome to Server, %s!\nPlease enter your password below.\n\n{FFFFFF}* Last Login: %s *", Player, LastLog); ShowPlayerDialog(playerid,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"Account Login",loginstring,"Login","Quit"); } In Baza de Date (La `users`): `lastOn` varchar(50) NOT NULL DEFAULT '01/01/1970 01:01:01',Multumesc!
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now