07.09.2009, 23:53
Basically I have it so theirs a text draw where you have "Login Attempts Remanining" in the corner, Its value changes depending on how many "login counts" you have, If you reach 3, It autokicks you.
Now I have this code for login
I'm trying to make it so each time you attempt to login and you fail, It will increase the login by one. I have only started to code a few days ago so bare with me. Thanks.
Oh and also in general increasing values such as "playerkicked' I want to keep track of how many times a player is kicked and banned and want it to increase if the command is targeting them, How is this done?
Now I have this code for login
Код:
dcmd_login(playerid,params[]) { if (PlayerI[playerid][PlayerLogged] == 1) return SystemMsg(playerid,"Already Logged In"); if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Account doesn't exist, please use '/register password'."); if (strlen(params)==0) return SystemMsg(playerid,"Correct usage: '/login password'"); if (udb_CheckLogin(PlayerName(playerid),params)) { PlayerI[playerid][PlayerLogged] = 1; Login(playerid); //login the player if hes loggedin succesfully return SystemMsg(playerid,"Successfully logged in!"); else { PlayerI[playerid][LoginCount] ++ 1; }} return 1; }
Oh and also in general increasing values such as "playerkicked' I want to keep track of how many times a player is kicked and banned and want it to increase if the command is targeting them, How is this done?