Offline commands problem
#1

I made offline command and don't work:

Код:
CMD:off(playerid, params[])
	{
	    new text[128]; new player; new ammount; new string[128];
	    if(sscanf(params, "us[48]i", player, text, ammount))
		{
			SendClientMessage(playerid, WHITE, "HELP: /off [Player_Player] [admin/leader] [ammount]");
			SendClientMessage(playerid, WHITE, "HELP: admin | leader");
			return 1;
		}
		if(strcmp(text,"admin",true) == 0)
		{
		format(string, sizeof(string),"Players/%s.ini", player);
		dini_IntSet(string,"Admin",ammount);
		format(string,sizeof(string),"You set admin: %s level: %d", player, ammount);
		SendClientMessage(playerid, RED, string);
		}
		if(strcmp(text,"leader",true) == 0)
		{
		format(string, sizeof(string),"Players/%s.ini", player);
		dini_IntSet(string,"Leader",ammount);
		format(string,sizeof(string),"You set: %s to run gang ID: %d", player, ammount);
		SendClientMessage(playerid, RED, string);
		}
		return 1;
	}
Can u tell me whats wrong?

Sry for my bad English.
Reply


Messages In This Thread
Offline commands problem - by |MadDog| - 26.01.2013, 07:08
Re: Offline commands problem - by Threshold - 26.01.2013, 07:28
Re: Offline commands problem - by |MadDog| - 26.01.2013, 07:31
Re: Offline commands problem - by Frede - 26.01.2013, 07:33
Re: Offline commands problem - by Threshold - 26.01.2013, 07:37
Re: Offline commands problem - by |MadDog| - 26.01.2013, 07:47

Forum Jump:


Users browsing this thread: 1 Guest(s)