[HELP] Can you see any errors on this cmd?
#6

(Ignoring the identation)

this would work, with one brace less:

Код:
if(strcmp(cmd, "/clothes", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {  new level;
	    level = strval(tmp);
			if(level > 299 || level < 1) { return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, 0xC0C0C0FF, "USAGE: /clothes [skin id]");
				return 1;
			}
			if(PlayerToPoint(1,playerid,217.5215,-98.3179,1005.2578))
			  {    GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
					  PlayerInfo[playerid][pChar] = level;
						format(string, sizeof(string), "You have changed your clothes",level);
						SendClientMessage(playerid, 0xFFFFFFFF, string);
					  SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
			}
			else
			{
				SendClientMessage(playerid, 0xC0C0C0FF, "  you are not at the clothes shop!");
			}

		return 1;
	}
	return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)