Jump to content
  • 0

Problema /VIPS


VenoM

Question

Comanda asta vreau sa arate Vip-i online.Dar am facut-o , nu imi da nici o eroare , dar cand intru si o scriu in joc nu face nimic....nu merge...

dcmd(vips,4,cmdtext);

dcmd_vips(playerid, params[])
{
 	#pragma unused params
	new string[128];
	if(IsPlayerConnected(playerid))
	{
		for (new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(dini_Int(PFile(playerid),"Vip")<1)   <------------ (Cred ca aici am gresit ceva dar nu-mi dau seama ce)
				{
					format(string, sizeof(string),"Vips : %s{FFAF00(%d)", Name, i);
					SendClientMessage(playerid, green, string);

                    //ShowPlayerDialog(playerid, ADMIN_LIST, DIALOG_STYLE_LIST,"Online Admins: (command unstable)", string, "Send PM", "Close");
    			}
			}
		}
	}
	return 1;
}
O comanda care merge perfect din acelasi FS:
dcmd_vheal(playerid, params[])
{
    #pragma unused params
	if(dini_Int(PFile(playerid),"VipMember")<1)return SendClientMessage(playerid, red, "[ERROR]You must became Premium member to use this command");
	if(PlayerInfo[playerid][hTime] != 0) return SendClientMessage(playerid, red, "[ERROR]You must wait 3 minutes to use this command again");
	SetPlayerHealth(playerid, 100.0);
	SendClientMessage(playerid,green,"You health has been set to full. You must wait 3 minutes to use this command again");
	SetTimer("HealTimer",180000, false);
	return 1;
}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Ia incearca in loc de dcmd_vips(playerid, params[])

dcmd_vips(playerid, params[], string[128])
Cum sa spui asa ceva ? CUM ?!?
if(dini_Int(PFile(playerid),"Vip")<1)   <------------ (Cred ca aici am gresit ceva dar nu-mi dau seama ce)
intr-adevar, aici ai gresit, in loc de PFile(playerid) pune PFile(i) sau
GetPlayerName( i, Name, MAX_PLAYER_NAME );
if(dini_Int(PFile(Name),"Vip")<1)
(cred ca asta cu GetPlayerName)
format(string, sizeof(string),"Vips : %s{FFAF00(%d)", Name, i);
trebuie pus asa:
GetPlayerName( i, Name, MAX_PLAYER_NAME );
format(string, sizeof(string),"Vips : %s{FFAF00(%d)", Name, i);
Deci comanda va fi:
dcmd_vips(playerid, params[])
{
 	#pragma unused params
	new string[128];
	if(IsPlayerConnected(playerid))
	{
		for (new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
                                GetPlayerName( i, Name, MAX_PLAYER_NAME );
				if(dini_Int(PFile(Name),"Vip")<1)   <------------ (Cred ca aici am gresit ceva dar nu-mi dau seama ce)
				{
                                        GetPlayerName( i, Name, MAX_PLAYER_NAME );
					format(string, sizeof(string),"Vips : %s{FFAF00(%d)", Name, i);
					SendClientMessage(playerid, green, string);

                    //ShowPlayerDialog(playerid, ADMIN_LIST, DIALOG_STYLE_LIST,"Online Admins: (command unstable)", string, "Send PM", "Close");
    			}
			}
		}
	}
	return 1;
}

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.