Jump to content
  • 0

Admin name rank.


DavidTKD

Question

Salut as dori putin ajutor vreau sa fac la admin name gen cand cineva da /admins si apare in lista numele la admin 7 si ce vreau sa zic este ca daca sunt 2 admini de acelasi nivel sa le separ cumva numele sa nu scrie la amndoi Adminstrator 7 si sa scrie owner 7 se poate face ?

 

case 1: string = "Admin Level 1";
        case 2: string = "Admin Level 2";
        case 3: string = "Admin Level 3";
        case 4: string = "Admin Level 4";
        case 5: string = "Admin Level 5";
        case 6: string = "Admin Level 6";
        case 7: string = "Adminstrator"; Persoana X  

        case 7: string = "Owner"; Persoana Y

 

Edited by DavidTKD
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Salut, nu ai decat sa pui in interiorul caseului cate un if pentru fiecare nume, daca asa am inteles ca vrei sa faci

 

 case 7:
{
	if(strmatch("Mr.Zeth",GetName(playerid)))	string = "Fondator"; 
	else if(strmatch("DavidTKD",GetName(playerid)))	string = "Owner"; 
	else 	string = "Administrator"; 
}

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
3 minutes ago, Mister said:

Salut, nu ai decat sa pui in interiorul caseului cate un if pentru fiecare nume, daca asa am inteles ca vrei sa faci

 

 case 7:
{
	if(strmatch("Mr.Zeth",GetName(playerid)))	string = "Fondator"; 
	else if(strmatch("DavidTKD",GetName(playerid)))	string = "Owner"; 
	else 	string = "Administrator"; 
}

 

Da exact asa ceva iti multumesc mult.

Link to comment
Share on other sites

  • 0
18 minutes ago, DavidTKD said:

De la ce o fi acest error (16362) : error 017: undefined symbol "strmatch"
(16363) : error 017: undefined symbol "strmatch" 

pentru ca nu ai functia in gm


strmatch(const String1[], const String2[])
{
	if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))	return true;
	else	return false;
}

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
5 minutes ago, Mister said:

pentru ca nu ai functia in gm


strmatch(const String1[], const String2[])
{
	if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))	return true;
	else	return false;
}

 

Am schimbat in loc de strmatch am pus strcmp si nu mai da error.

 

Link to comment
Share on other sites

  • 0
33 minutes ago, DavidTKD said:

Am schimbat in loc de strmatch am pus strcmp si nu mai da error.

 

Inca o chestie care ma bagat in ceata si nu prea imi dau seama ce as mai putea face

   case 7:
{
    if(strcmp("Mr.Bean",GetName(playerid)))    string = "Fondator";
    else if(strcmp("Alandala",GetName(playerid)))    string = "Co-Owner";
    else if(strcmp("DavidTKD",GetName(playerid)))    string = "Owner";
    else     string = "Administrator";
}
    }
    return string;

}

Problema este ca in GM am la Mr.Bean Fondator si pe joc am Co-Owner :)) ce poate fi si Fondator il are in joc DavidTKD cu Owner in GM  ?
 

 

Edited by DavidTKD
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.