Name based command
#5

nvm I got it xD

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new playername[MAX_PLAYER_NAME];
	if (strcmp("/clothes", cmdtext, true, 10) == 0)
	{
  	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
		if(strcmp("Player_Name",playername, true, 5) == 0)
		{
 			SetPlayerSkin(playerid, 186);
 			return 1;
  	}
		else if(strcmp("Player_Two",playername, true, 10) == 0)
		{
 			SetPlayerSkin(playerid, 187);
			return 1;
		}
		else
		{
			SendClientMessage(playerid, 0xBFC0C2FF, "Can not use this command");
			return 1;
 		}
	}
	return 0;
}
Don't know what was wrong but it works now xD
Reply


Messages In This Thread
Name based command - by Ov3rl0rd - 09.09.2009, 00:35
Re: Name based command - by Abernethy - 09.09.2009, 00:49
Re: Name based command - by Ov3rl0rd - 09.09.2009, 01:07
Re: Name based command - by Abernethy - 09.09.2009, 01:24
Re: Name based command - by Ov3rl0rd - 09.09.2009, 01:39

Forum Jump:


Users browsing this thread: 1 Guest(s)