help with id!
#1

this command is work and all good no erros but what is the problem when i do in the game

/setlevel (playerid) (level)
Exampel
/setlevel 3 1

its tell me

SERVER: UNKNOWN COMMAND


Код:
dcmd_setlevel(playerid, params[])
{
	new Level, pID, pName[24], str[128], PlayerFile[100];

	if(Player[playerid][admin] < 5) return SendClientMessage(playerid, COLOR_RED, "You Dont Have Right To Use This Command");
	if(sscanf(params, "ud",playerid, Level)) return SendClientMessage(playerid, COLOR_RED, "|| Usage: /setlevel [playerid] [level] ||");
	GetPlayerName(playerid, pName, sizeof(pName));
	format(PlayerFile, sizeof(PlayerFile), "maxadmin/users/%s.ini", pName);
	if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	if(!dini_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_RED, "That player isn't registered!");
	if(Player[playerid][admin] == Level) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is moderator already!");
	
	if(Level == 1)
	{
 		format(str, sizeof(str), "You have promoted %s to a staff team", pName);
		SendClientMessage(playerid, COLOR_GREEN, str);
		format(str, sizeof(str), "You have prometed to a staff team status.", pName);
		SendClientMessage(pID, COLOR_GREEN, str);
		Player[playerid][admin] = 1;
		dini_IntSet(PlayerFile, "Level", 1);
	}
	return 1;
}
Reply


Messages In This Thread
help with id! - by [MKD]Max - 20.01.2011, 16:12
Re: help with id! - by blackwave - 20.01.2011, 16:19
Re: help with id! - by [MKD]Max - 20.01.2011, 16:22
Re: help with id! - by Ironboy500[TW] - 20.01.2011, 16:23
Re: help with id! - by [MKD]Max - 20.01.2011, 16:29
Re: help with id! - by Ironboy500[TW] - 20.01.2011, 16:30
Re: help with id! - by [MKD]Max - 20.01.2011, 16:32
Re: help with id! - by Ironboy500[TW] - 20.01.2011, 16:35
Re: help with id! - by [MKD]Max - 20.01.2011, 16:39
Re: help with id! - by Ironboy500[TW] - 20.01.2011, 16:49

Forum Jump:


Users browsing this thread: 5 Guest(s)