[Help] problem with /me and etc.
#5

Quote:
Originally Posted by Varna
This script makes problems.
If i type "/mewhatsup" it will say "Firstname_Lastname hatsup" instead of "Unknown command"
It sounds like a little problem which can be ignored but it makes big problems with other commands. for example i got command
"/skin" but with this script it will mess with "/s" command and "/skin" wont work but will say "Firstname_Lastname shouts: kin"
You are very correct Varna, let me show you the two commands:

Код:
if(!strcmp(cmdtext,"/s",true,2)) 
{
	if(cmdtext[4] == " ") return SendClientMessage(playerid,"0x0000ff,"USAGE: /s text");
	
	new str[128],name[MAX_PLAYERNAME];
	GetPlayerName(playerid,name,sizeof(name));
	format(str,sizeof(str),"%s [ID: %d] shouts: %s,name,playerid,cmdtext[3])
	SendClientMessageToAll(0xffffffaa,str);
	
	return 1;
}
Код:
if(!strcmp(cmdtext,"/skin",true,5))
{
	new tmp[56], skin, Index;
	
	tmp=strtok(cmdtext,Index);
	if(!strlen(tmp)) return SendClientMessage(playerid,0xff0000aa,"USAGE: /skin skinid");
	
	skin=strval(tmp);
	if(skin<0 || skin>299) return SendClientMessage(playerid,0xffffffaa,"Invalid Skin Id);

	SetPlayerSkin(playerid,skin);
	SendClientMessage(playerid,0x00ffffaa,"You have changed your skin successfully");

	return 1;
}
Now if you type in /s and you don't have anything in front, it will say USAGE : /s text. If you type /skin and nothing after it, then it will say USAGE: /skin skinid.
Reply


Messages In This Thread
[Help] problem with /me and etc. - by Varna - 11.06.2010, 16:03
Re: [Help] problem with /me and etc. - by DJDhan - 11.06.2010, 16:09
Re: [Help] problem with /me and etc. - by Varna - 11.06.2010, 16:23
Re: [Help] problem with /me and etc. - by Aleksandar_Zivanovci - 11.06.2010, 16:28
Re: [Help] problem with /me and etc. - by DJDhan - 11.06.2010, 17:40
Re: [Help] problem with /me and etc. - by Varna - 11.06.2010, 18:59
Re: [Help] problem with /me and etc. - by DJDhan - 11.06.2010, 19:25
Re: [Help] problem with /me and etc. - by Varna - 11.06.2010, 19:29
Re: [Help] problem with /me and etc. - by DJDhan - 11.06.2010, 19:32
Re: [Help] problem with /me and etc. - by Varna - 12.06.2010, 09:37

Forum Jump:


Users browsing this thread: 1 Guest(s)