Problem CMD
#5

Quote:
Originally Posted by KamilPolska
View Post
Eg.
CMD:makeleader - k<fix>d - para1, level
CMD:giveleaderorg - dK<fix>(-1) - family, id
Code:
SSCANF:fix(string[])
{
	new ret = INVALID_PLAYER_ID;
	
	if(IsNumeric(string))
	{
		new p = strval(string);
		if(IsPlayerConnected(p))
			ret = p;
	}
	else 
	{
		foreach(Player, p)
		{
			if(strfind(GetNick(p), string, true) != -1)
			{
				ret = p;
				break;
			}
		}
	}
	
	return ret;
}
Have you ever heard of the specifier "u"?

EDIT:
PHP Code:
    new targetid;
    if(
sscanf(params"du"familytargetid)) 
        return 
SendClientMessage(playerid, -1"USAGE /giveleaderorg [ORG ID] [ID]"); 
Reply


Messages In This Thread
Problem CMD - by KamilPolska - 06.04.2019, 15:02
Re: Problem CMD - by Private200 - 06.04.2019, 15:32
Re: Problem CMD - by KamilPolska - 06.04.2019, 17:29
Re: Problem CMD - by KamilPolska - 06.04.2019, 17:34
Re: Problem CMD - by TheToretto - 06.04.2019, 19:07
Re: Problem CMD - by KamilPolska - 07.04.2019, 01:47

Forum Jump:


Users browsing this thread: 3 Guest(s)