if(!strcmp(cmdtext, \"/aduty\", true)) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \"Előbb jelentkezz be!!\"); return 1; } if(Admin(playerid, 1)) { if(AdminDuty[playerid] == 0) // adminszolgálat be { if(PlayerInfo[playerid][Adminsz] == 1) { Nevekbe(playerid); } if(PlayerInfo[playerid][Adminsz] == 0) { Nevekbe(playerid); } AdminDuty[playerid] = 1; PlayerInfo[playerid][Engedi] = 1; new kuldo[MAX_PLAYER_NAME]; GetPlayerName(playerid, kuldo, sizeof(kuldo)); new Float:AX,Float:AY,Float:AZ; GetPlayerPos(playerid, AX,AY,AZ); SendClientMessage(playerid,COLOR_WHITE,\"Adminszolgálatba álltál!\"); GetPlayerName(playerid,sendername,sizeof(sendername)); format(string, sizeof(string), \"%s Adminszolgálatba lépett, ha segítség kell írj neki: /pm %d\", sendername, playerid); OOCNews(COLOR_LIGHTBLUE,string); SetPlayerColor(playerid, COLOR_DBLUE); TogglePlayerControllable(playerid, 1); new nev[32]; GetPlayerName(playerid, nev, sizeof(nev)); GetPlayerPos(playerid, AX,AY,AZ); SetPlayerPos(playerid, AX,AY,AZ+1); format(stringx,sizeof(stringx), \"%s\",nev); DutyLabelNev[playerid] = Create3DTextLabel(stringx,0xFB0000FF,0,0,0,50,-1,1); Attach3DTextLabelToPlayer(DutyLabelNev[playerid], playerid, 0,0,0.2); new h,mi,s,y,m,d; getdate(y,m,d); gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s adminszolgálatba állt.\",y,m,d,h,mi,s,nev); LoOoG(stringx); } return 1; } else if(AdminDuty[playerid] == 1) // adminszolgálat ki { if(PlayerInfo[playerid][Adminsz] == 1) { Nevekbe(playerid); } if(PlayerInfo[playerid][Adminsz] == 0) { Nevekki(playerid); } PlayerInfo[playerid][Engedi] = 0; Delete3DTextLabel(DutyLabelNev[playerid]); TogglePlayerControllable(playerid, 1); AdminDuty[playerid] = 0; new kuldo[MAX_PLAYER_NAME]; GetPlayerName(playerid, kuldo, sizeof(kuldo)); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); SetPlayerPos(playerid, X,Y,Z+1); SendClientMessage(playerid,COLOR_WHITE,\"Kiléptél Adminszolgálatból!\"); GetPlayerName(playerid,sendername,sizeof(sendername)); format(string, sizeof(string), \"%s kilépett az Adminszolgálatból. Segítség kell /asreport.\", sendername); OOCNews(COLOR_LIGHTRED,string); SetPlayerColor(playerid, COLOR_GRAD2); new nev[32]; GetPlayerName(playerid, nev, sizeof(nev)); new h,mi,s,y,m,d; getdate(y,m,d); gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s kilépett adminszolgálatból.\",y,m,d,h,mi,s,nev); SetPlayerColor(playerid, COLOR_GRAD2); LoOoG(stringx); return 1; } else { SendClientMessage(playerid, COLOR_GREY, \"Nem vagy admin.\"); return 1; } } return 1; }
if(!strcmp(cmdtext, \"/aduty\", true)) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \"Előbb jelentkezz be!!\"); return 1; } if(Admin(playerid, 1)) { if(AdminDuty[playerid] == 0) // adminszolgálat be { if(PlayerInfo[playerid][Adminsz] == 1) { Nevekbe(playerid); } if(PlayerInfo[playerid][Adminsz] == 0) { Nevekbe(playerid); } AdminDuty[playerid] = 1; PlayerInfo[playerid][Engedi] = 1; new kuldo[MAX_PLAYER_NAME]; GetPlayerName(playerid, kuldo, sizeof(kuldo)); new Float:AX,Float:AY,Float:AZ; GetPlayerPos(playerid, AX,AY,AZ); SendClientMessage(playerid,COLOR_WHITE,\"Adminszolgálatba álltál!\"); GetPlayerName(playerid,sendername,sizeof(sendername)); format(string, sizeof(string), \"%s Adminszolgálatba lépett, ha segítség kell írj neki: /pm %d\", sendername, playerid); OOCNews(COLOR_LIGHTBLUE,string); SetPlayerColor(playerid, COLOR_DBLUE); TogglePlayerControllable(playerid, 1); new nev[32]; GetPlayerName(playerid, nev, sizeof(nev)); GetPlayerPos(playerid, AX,AY,AZ); SetPlayerPos(playerid, AX,AY,AZ+1); format(stringx,sizeof(stringx), \"%s\",nev); DutyLabelNev[playerid] = Create3DTextLabel(stringx,0xFB0000FF,0,0,0,50,-1,1); Attach3DTextLabelToPlayer(DutyLabelNev[playerid], playerid, 0,0,0.2); SetPlayerHealth(playerid, 9999); SetPlayerArmour(playerid, 9999); new h,mi,s,y,m,d; getdate(y,m,d); gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s adminszolgálatba állt.\",y,m,d,h,mi,s,nev); LoOoG(stringx); } return 1; } else if(AdminDuty[playerid] == 1) // adminszolgálat ki { if(PlayerInfo[playerid][Adminsz] == 1) { Nevekbe(playerid); } if(PlayerInfo[playerid][Adminsz] == 0) { Nevekki(playerid); } PlayerInfo[playerid][Engedi] = 0; Delete3DTextLabel(DutyLabelNev[playerid]); TogglePlayerControllable(playerid, 1); AdminDuty[playerid] = 0; new kuldo[MAX_PLAYER_NAME]; GetPlayerName(playerid, kuldo, sizeof(kuldo)); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); SetPlayerPos(playerid, X,Y,Z+1); SendClientMessage(playerid,COLOR_WHITE,\"Kiléptél Adminszolgálatból!\"); GetPlayerName(playerid,sendername,sizeof(sendername)); format(string, sizeof(string), \"%s kilépett az Adminszolgálatból. Segítség kell /asreport.\", sendername); OOCNews(COLOR_LIGHTRED,string); SetPlayerColor(playerid, COLOR_GRAD2); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0); new nev[32]; GetPlayerName(playerid, nev, sizeof(nev)); new h,mi,s,y,m,d; getdate(y,m,d); gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s kilépett adminszolgálatból.\",y,m,d,h,mi,s,nev); SetPlayerColor(playerid, COLOR_GRAD2); LoOoG(stringx); return 1; } else { SendClientMessage(playerid, COLOR_GREY, \"Nem vagy admin.\"); return 1; } } return 1; }