SSCANF parameter issue.
#4

Not tested, try this.

Код:
CMD:set(playerid,params[])
		{
			new string[128], giveplayerid, statcode, level;
			if(sscanf(params, "udd", giveplayerid, statcode, level)) {
			
        	SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: /set [option]");
        	return SendClientMessage(playerid, 0xFFFFFFFF, "Available options: adminlevel");
		}
		if(IsPlayerConnected(giveplayerid))
		{
			switch (statcode)
			{
  				case 1:
				{
					format(string,sizeof(string),"You gave %s(%i) admin level %i!",GetName(giveplayerid), giveplayerid, level);
					SendClientMessage(playerid,-1, string);
					PlayerInfo[giveplayerid][pAdmin] = level;
				}
			}
			return 1;
  		}
Reply


Messages In This Thread
SSCANF parameter issue. - by Stefhan - 19.04.2018, 20:02
Re: SSCANF parameter issue. - by Hunud - 19.04.2018, 20:05
Re: SSCANF parameter issue. - by Stefhan - 19.04.2018, 20:09
Re: SSCANF parameter issue. - by Hunud - 19.04.2018, 20:17
Re: SSCANF parameter issue. - by AdamsLT - 19.04.2018, 20:27
Re: SSCANF parameter issue. - by Stefhan - 19.04.2018, 20:49
Re: SSCANF parameter issue. - by kovac - 19.04.2018, 21:01
Re: SSCANF parameter issue. - by AdamsLT - 19.04.2018, 21:03
Re: SSCANF parameter issue. - by Stefhan - 19.04.2018, 21:20
Re: SSCANF parameter issue. - by Dayrion - 19.04.2018, 21:23

Forum Jump:


Users browsing this thread: 1 Guest(s)