Jump to content
  • 0

Intrebare system de admin By zh3r0


shaun

Question

salut all.

As vrea ca la comanda /helpers sa arate adminii de level 1...

uitati comanda care arata toti adminii(facuta de zh3r0)

[pawn]

CMD:admins(PARAMS)

{

    LoginCheck(playerid);

   

    new C, S[1024], cString[150];

    foreach(Player, i){

if(P_DATA[Level] > 0){

C++;

}

}

    format(cString, sizeof (cString), "%s", © ? (OnlineCheck("Admins", C)) : ("{FF0000}No VIP members online!")) ;

    if(C == 1){

    foreach(Player, i){

if(P_DATA[Level] > 0){

        format(S, sizeof (S), "%s"GREE"%s"W"["GREE"L:%d|ID:%d"W"]",cString, Name(i), P_DATA[Level],i);

}

}

}

if(C > 1){

foreach(Player, i){

if(P_DATA[Level] > 0){

    format(S, sizeof (S), "%s"GREE"%s"W"["GREE"L:%d|ID:%d"W"], ",S, Name(i), P_DATA[Level],i);

    if(!(i % MAX_SHOW_PER_ROW)){

    if(i != 0){

strdel(S, strlen(S) - 2, strlen(S));

strins(S, "\n", strlen(S));

//S[0] = EOS;

}

}

}

}

}

if(!C)   format(S, sizeof (S), "%s", cString);

if(strlen(S) < 1024) SPD(playerid, Dialog:Empty, BOX, "{FFFFFF}Online Administrators!", S, "Close", "");

if(strlen(S) > 1024) SPD(playerid, Dialog:Empty, BOX, "{FFFFFF}Online Administrators!", "{FF0000}An error has occured while trying to show the online administrators!\n{FFFFFF}Please contact the owner and inform him about this problem!", "Close", "");

return 1;

}

[/pawn]

Help :) :azn:

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

CMD:helpers(PARAMS)
{
    LoginCheck(playerid);
    
    new C,	S[1024],	cString[150];

    foreach(Player, i){
		if(P_DATA[i][Level] == 1){
			C++;
		}
	}

    format(cString, sizeof (cString), "%s", (C) ? (OnlineCheck("Admins", C)) : ("{FF0000}No VIP members online!")) ;

    if(C == 1){
	    foreach(Player, i){
			if(P_DATA[i][Level] == 1){
	        	format(S, sizeof (S), "%s"GREE"%s"W"["GREE"L:%d|ID:%d"W"]",cString, Name(i), P_DATA[i][Level],i);
			}
		}
	}

	if(C > 1){
		foreach(Player, i){
			if(P_DATA[i][Level] == 1){
			    format(S, sizeof (S), "%s"GREE"%s"W"["GREE"L:%d|ID:%d"W"], ",S, Name(i), P_DATA[i][Level],i);

			    if(!(i % MAX_SHOW_PER_ROW)){
				    if(i != 0){
						strdel(S, strlen(S) - 2, strlen(S));
						strins(S, "\n", strlen(S));
						//S[0] = EOS;
					}
				}
			}
		}
	}
	if(!C) 				  format(S, sizeof (S), "%s", cString);
	if(strlen(S) < 1024) SPD(playerid, Dialog:Empty, BOX, "{FFFFFF}Online Administrators!", S, "Close", "");
	if(strlen(S) > 1024) SPD(playerid, Dialog:Empty, BOX, "{FFFFFF}Online Administrators!", "{FF0000}An error has occured while trying to show the online administrators!\n{FFFFFF}Please contact the owner and inform him about this problem!", "Close", "");
	return 1;
}

Link to comment
Share on other sites

Guest PlayON

Dupa cum vezi, ai OnlineCheck in comanda, daca vrei sa vezi helperi, sau sa scrie cum trebuie adauga:

[pawn]if(!strcmp(type, "Helpers"))

    {

if(C > 1) format(cS, sizeof (cS), ""W"There are "BLUE"%d"W" Helpers online!\n\n", C);

else format(cS, sizeof (cS), ""W"There is only "BLUE"1"W" Helpers online!\n\n");

}[/pawn]

In functia OnlineCheck(type[], C)

Iar din

format(cString, sizeof (cString), "%s", (C) ? (OnlineCheck("Admins", C)) : ("{FF0000}No VIP members online!")) 

Unde vezi "Admins" schimba cu "Helpers".

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.