SA-MP Forums Archive
Using y_uvar and y_users, need help with that. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Using y_uvar and y_users, need help with that. (/showthread.php?tid=422962)



Using y_uvar and y_users, need help with that. - RajatPawar - 16.03.2013

Hey guys, I am building this complete YSI mode.
I am unsure on how to check if a player is registered or not, since YSI uses UID for file names, not user names, so files look like "000001.ini" and not "Name.ini".
I tried !fexist - format(st, size, "\YSI\users\%d.ini", Get_YID(playerid) );
and something like that to check if he is registered and then using the response to Player_Try(Login/Register) but I knew all along it's wrong.
Can someone direct me in the correct direction? (preferably ******)?


Re: Using y_uvar and y_users, need help with that. - Pottus - 16.03.2013

There is a function Player_IsRegistered(playerid) also if your interested I've re-written the /login and /register commands into dialogs.


Re: Using y_uvar and y_users, need help with that. - RajatPawar - 16.03.2013

Ah, then it's a piece of cake ! Just check if Player is registered and show the required dialog ! Also, I am curious, why is it Player_TryRegister? It wouldn't fail registering with ''wrong pass'', would it? Or is it for say, wrong strlen?


Re: Using y_uvar and y_users, need help with that. - Pottus - 16.03.2013

****** could probably explain that that better than me, anyways try out these functions.

Implements a dialog login/register and changepass command you still need to call them though.

http://pastebin.com/GUjiDS8b