30.04.2010, 08:30
i was making a login command for an admin system...
but when i try to login everytime it success... i mean any password is working -.-
here is my command:
any help??
but when i try to login everytime it success... i mean any password is working -.-
here is my command:
Код:
dcmd_login(playerid,params[]) { if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,RED,"You are already logged in."); if (!strlen(params)) return SendClientMessage(playerid,RED,"USAGE: '/login [password]'"); new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); new pFile[256]; format(pFile,sizeof(pFile),File,pName); PlayerInfo[playerid][Password] = dini_Int(pFile,"Password"); new param = strval(params); if(param != PlayerInfo[playerid][Password]) { SendClientMessage(playerid,RED,"Invalid Password!"); } if(param == PlayerInfo[playerid][Password]) { SendClientMessage(playerid,GREEN,"You are now logged-in!"); } return 1; }