SA-MP Forums Archive
[Request]Please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Request]Please (/showthread.php?tid=550469)



[Request]Please - astanalol - 13.12.2014

Hello Everyone
i Want Know How To Make Setrank And AdminsList To See His Name And Rank Name im use ZCMD And y_ini im new im done making somthings in it
PHP код:
#define Trial_Admin 10
#define Junior_Administrator 11
#define General_Administrator 12
#define Senior_Administrator 13
#define Head_Administrator 14
#define Community_Manager 15
#define Co-Owner 16 
PHP код:
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Health",PlayerInfo[playerid][pHealth]);
    
INI_Int("Armour",PlayerInfo[playerid][pArmour]);
    
INI_Int("Admin",PlayerInfo[playerid][pRank]); 
PHP код:
This on PlayerSpawn
if(PlayerInfo[playerid][pRank] == Trial_Admin)
{
//your things do here
}
else if(
PlayerInfo[playerid][pRank] == Junior_Administrator)
{
//your things do here
}
else if(
PlayerInfo[playerid][pRank] == General_Administrator)
{
//your things do here
}
else if(
PlayerInfo[playerid][pRank] == Senior_Administrator)
{
//your things do here
}
else if(
PlayerInfo[playerid][pRank] == Head_Administrator)
{
//your things do here
}
else if(
PlayerInfo[playerid][pRank] == Community_Manager)
{
//your things do here
}
else if(
PlayerInfo[playerid][pRank] == Co-Owner)
{
//your things do here

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
switch( 
dialogid )
{
case 
DIALOG_REGISTER:
{
if (!
response) return Kick(playerid);
if(
response)
{
if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
new 
INI:File INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0); 
PHP код:
enum pInfo
{
 
pCash,
 
pRank

im Done Making All This Now i Want know how to Make SetRank And only Can Make SetRank Admins Rank 6 Or Rcon
And When Write /AdminsList Show To Him Name + Rank Name Example Co_Owner or somthings in 7 Rank
Help Please
Thanks For All


Re: [Request]Please - astanalol - 13.12.2014

Bumb


Re: [Request]Please - astanalol - 13.12.2014

Please Help!


Re: [Request]Please - astanalol - 14.12.2014

Bumb


Re: [Request]Please - astanalol - 14.12.2014

Please Help!


Re: [Request]Please - astanalol - 14.12.2014

Please Help !!


Re: [Request]Please - TRTDM - 14.12.2014

Instead of this why not use this??
Код:
#define Trial_Admin 10 
#define Junior_Administrator 11 
#define General_Administrator 12 
#define Senior_Administrator 13 
#define Head_Administrator 14 
#define Community_Manager 15 
#define Co-Owner 16
Use this code instead of the above
Код:
stock RankLevelName(playerid)
{
	new RankLevelName[128];
	switch(PlayerInfo[playerid][pRank])
	{
		case 0: RankLevelName = "Player";
		case 1: RankLevelName= "Trial Moderator";
		case 2: RankLevelName= "Basic Moderator";
		case 3: RankLevelName= "Master Moderator";
		case 4: RankLevelName = "Senior Administrator";
		case 5: RankLevelName = "Proffesional Administrator";
		case 6: RankLevelName = "Lead Administrator";
		case 7: RankLevelName = "Head Administrator";
		case 8: RankLevelName= "Manager";
		case 9: RankLevelName = "Community Co-Owner";
		case 10: RankLevelName = "Community Owner";
	}
	return RankLevelName;
}
Replace this
Код:
This on PlayerSpawn 
if(PlayerInfo[playerid][pRank] == Trial_Admin) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == Junior_Administrator) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == General_Administrator) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == Senior_Administrator) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == Head_Administrator) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == Community_Manager) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == Co-Owner) 
{ 
//your things do here 
}
With this
Код:
This on PlayerSpawn 
if(PlayerInfo[playerid][pRank] == 0) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == 1) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == 2) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == 3) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == 4) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == 5) 
{ 
//your things do here 
} 
else if(PlayerInfo[playerid][pRank] == 6) 
{ 
//your things do here 
}