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;
}
PlayerInfo[playerid][ pAdmin ] >=lvl#) {
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;
CMD:admins(playerid, params[])
{
if(!IsPlayerConnected(playerid)) return 1;
new string[128], name[24];
SendClientMessage(playerid, -1, "-------------[Admins]-------------");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), "%s (ID: %i) - Admin Level %i", GetPlayerName(i, name, sizeof(name)), i, PlayerInfo[i][Admin]);
SendClientMessage(playerid, -1, string); //Change -1 to the color code or color define you have, unless you want it to be a random color.
}
}
SendClientMessage(playerid, -1, "----------------------------------");
return 1;
}
ShowPlayerDialog(playerid, 666, DIALOG_STYLE_INPUT, "Login", "Please type in your desired password below!", "Continue", "Cancel");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 666:
{
if(!response) return Kick(playerid);
new inputpass[64];
inputpass = inputtext;
Encrypt(inputpass);
OnPlayerLogin(playerid,inputpass);
}
}
return 0;
}
#define DIALOG_LOGIN 666
thnx but admin cmd did not work
D:\Drivers\unused\XTREME~1\GAMEMO~1\LSTWSE.pwn(475 4) : warning 203: symbol is never used: "dcmd_admins" |
dcmd_admins(playerid, cmdtext[]) {
new strtext[1000];
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, ".::Admins OnLine::.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[playerid][ pAdmin ] >= 1)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[Junior Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x99CCCCAA, string)
}
if(PlayerInfo[playerid][ pAdmin ] >= 2)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[General Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x99FFCCAA, string);
}
if(PlayerInfo[playerid][ pAdmin ] >= 3)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[Senior Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x99FFCCAA, string);
}
if(PlayerInfo[playerid][ pAdmin ] >= 4)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[Head Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x008D04FF, string);
}
if(PlayerInfo[playerid][ pAdmin ] >= 5)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[[Server Manager] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x006CA2FF, string);
}
if(PlayerInfo[i][pAdmin] == 6)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[Co-Executive Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x006CA2FF, string);
}
if(PlayerInfo[playerid][ pAdmin ] >= 7)
{
GetPlayerName(i, playern, sizeof(playern));
format(string, 128, "*[Executive Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
//SendClientMessage(playerid, 0x794040FF, string);
}
strcat(string, "\n");
strcat(strtext, string);
}
}
ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", strtext, "Ok",#);
}
return 1;
}
D:\Drivers\unused\XTREME~1\GAMEMO~1\LSTWSE.pwn(1754) : error 017: undefined symbol "playern" D:\Drivers\unused\XTREME~1\GAMEMO~1\LSTWSE.pwn(1754) : error 017: undefined symbol "playern" D:\Drivers\unused\XTREME~1\GAMEMO~1\LSTWSE.pwn(1754) : error 029: invalid expression, assumed zero D:\Drivers\unused\XTREME~1\GAMEMO~1\LSTWSE.pwn(1754) : fatal error 107: too many error messages on one line