Command
#1

How this should look on zcmd + scanf ?

Код:
if(strcmp(cmd,"/appearance",true) == 0)
	{
    	if(IsPlayerConnected(playerid))
    	{
		GetPlayerName(playerid, sendername, sizeof(sendername));
		new length = strlen(cmdtext);
		while ((idx < length) && (cmdtext[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[128];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = cmdtext[idx];
			idx++;
		}
		result[idx - offset] = EOS;
		if(!strlen(result))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /appearance [Description]");
			return 1;
		}
        strmid(PlayerInfo[playerid][pApp], result, 0, strlen(result), 255);
    	SendClientMessage(playerid,COLOR_GREY,"You have adjusted your appearance.");
    	return 1;
Reply


Messages In This Thread
Command - by KotoK - 30.01.2011, 23:22
Re: Command - by PeteShag - 31.01.2011, 00:42
Re: Command - by Antonio [G-RP] - 31.01.2011, 00:43
Re: Command - by KotoK - 31.01.2011, 01:54
Re: Command - by JamesC - 31.01.2011, 02:37
Re: Command - by KotoK - 31.01.2011, 02:50
Re: Command - by PeteShag - 31.01.2011, 03:23

Forum Jump:


Users browsing this thread: 1 Guest(s)