Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:admini(playerid, params[],help)
- {
- #pragma unused params
- new str1[512], str2[2048], year, month, day, hours, minutes, seconds;
- getdate(year, month, day), gettime(hours, minutes, seconds);
- if(!strcmp(AdminInfo[1][aAdmin], "Nitko", false)) return SCM(playerid, COLOR_BIJELA, "{FF0000}[ERROR / INFO]: {FFFFFF}Trenutno nemozete vidjeti listu admina jer nije kreirana!.");
- format(str1, sizeof(str1), "{FF4000}Vrijeme: {FFFFFF}%s%d:%s%d:%s%d - {FF4000}Datum: {FFFFFF}%s%d/%s%d/%s%d\n",(hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds , ((day < 10) ? ("0") : ("")),day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
- strcat(str2, str1);
- for(new i = 1; i < MAX_ADMINS; i++)
- {
- if(!strcmp(AdminInfo[i][aAdmin], "Nitko", false))
- {
- }
- else
- {
- if(IsPlayerConnected(IdByName(AdminInfo[i][aAdmin])))
- {
- format(str1, sizeof(str1), "{FFFFFF}Staff Slot: [%d] | Ime Administratora: [%s] | Administrator Level: [%d] | Trenutni Status: [{0DFF00}ONLINE{FFFFFF}]", i, AdminInfo[i][aAdmin],AdminInfo[i][aRank]);
- strcat(str2, str1);
- strcat(str2, "\n");
- }
- else
- {
- format(str1, sizeof(str1), "{FFFFFF}Staff Slot: [%d] | Ime Administratora: [%s] | Administrator Level: [%d] | Trenutni Status: [{FF0000}OFFLINE{FFFFFF}]", i, AdminInfo[i][aAdmin],AdminInfo[i][aRank]);
- strcat(str2, str1);
- strcat(str2, "\n");
- }
- }
- }
- SPD(playerid, DIALOG_LISTAADMINA, DIALOG_STYLE_MSGBOX, "{FF4000}Perfect Life {FFFFFF}Staff Team Lista Administratora & Aktivnost", str2, "Zatvori", "");
- return 1;
- }
- //STOCK PROVJERAVA IGRACEVO IME DAL JE NA SERVERU
- stock IdByName(name[])
- {
- new iPlayer;
- iPlayer = 999;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!strcmp(name, ImeIgraca(i), true))
- {
- iPlayer = i;
- }
- }
- }
- return iPlayer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement