22.07.2012, 08:09
i need dialog login system but right now my server has /login command and i dont know how to change it to dialog
and one more thing is i need /admins command
these are the players info
pawn Код:
dcmd_login(playerid, cmdtext[]) {
#pragma unused cmdtext
new idx, tmp[256];
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(PlayerInfo[ playerid ][ pLogged ] == 1) return SendClientMessage(playerid, COLOR_FINALSCORE, "-NRS- You are already logged in.");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "-NRS- USAGE: /login (password)");
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
these are the players info
PHP код:
PlayerInfo[playerid][ pAdmin ] >=lvl#) {
pawn Код:
PlayerInfo[playerid][ pCheckpoint ]=0;
PlayerInfo[playerid][ pLogged ]=0;
PlayerInfo[playerid][ plTMoney ]=0;
PlayerInfo[playerid][ plSMoney ]=0;
PlayerInfo[playerid][ pPlayingAGame ]=0;
PlayerInfo[playerid][ pPlayerVehicles ]=0;
PlayerInfo[playerid][ pClassID ]=0;
PlayerInfo[playerid][ pShowPM ]=0;
PlayerInfo[playerid][ pShowTPM ]=0;
PlayerInfo[playerid][ pCanUseCommands ]=1;
PlayerInfo[playerid][ pOnDuty ]=0;
PlayerInfo[playerid][ pSpawned ]=0;
PlayerInfo[playerid][ pAdmin ]=0;
PlayerInfo[playerid][ pChallengingMessage ]=0;
PlayerInfo[playerid][ pBike ]=0;
PlayerInfo[playerid][ pTheKiller ]=0;
PlayerInfo[playerid][ pMuted ]=0;
PlayerInfo[playerid][ pKills ]=0;
PlayerInfo[playerid][ pDeaths ]=0;