Commands wont work
#1

Hello,i tried to make an command with you can promote any user if you are RCON admin,but if i write /promote 0,it wont work,nothing wont show up

heres the code

Код:
	if(strcmp(cmdtext, "/promote", true) == 0)
	{
	if(IsPlayerConnected(playerid))
	{

	new tmp[32];

	if(!strlen(tmp))
	{
	SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /promote [playerid/PartOfName]");
	return 1;
	}

	new string[256];
	new para1;
	para1 = strval(tmp);
  new giveplayer[MAX_PLAYER_NAME];
 	new sendername[MAX_PLAYER_NAME];
	GetPlayerName(para1, giveplayer, sizeof(giveplayer));
	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(IsPlayerConnected(para1))
	{
	if(IsPlayerAdmin(playerid))
	{
	format(string, sizeof(string), " You have promoted %s to Principal.", giveplayer);
	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	PlayerInfo[playerid][fLeader] = 1;
	SetPlayerSkin(playerid,295);
	}
	}
	else
	{
	SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command(leaders only)!");
	}
	}
	return 1;
	}
Reply


Messages In This Thread
Commands wont work - by WardenCS - 05.04.2010, 18:41
Re: Commands wont work - by ¤Adas¤ - 05.04.2010, 18:46
Re: Commands wont work - by WardenCS - 05.04.2010, 19:11

Forum Jump:


Users browsing this thread: 1 Guest(s)