Changeing A Command
#1

Okay i need to change a command right now if you do the chat it's " (YOur text here)" and im trying to change it to "/b (your text here)" and it's not working.
Код:
	}
 	new idx;
	tmp = strtok(text, idx);
 	if((strcmp("(", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("(")))
	{
	    if(text[1] != 0)
	    {
		    format(string, sizeof(string), "(( [LOCAL OOC:] %s says: %s ))", PlayerName(playerid),text[1]);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			OOCLog(string);
	   		return 0;
   		}
	}
Is the orgianl
and the on i modified to work is

Код:
 	new idx;
	tmp = strtok(text, idx);
 	if((strcmp("/b", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("(")))
	{
	    if(text[1] != 0)
	    {
		    format(string, sizeof(string), "(( [LOCAL OOC:] %s says: %s ))", PlayerName(playerid),text[1]);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			OOCLog(string);
	   		return 0;
   		}
	}
and it doesnt work
Reply


Messages In This Thread
Changeing A Command - by robert4049 - 13.07.2010, 20:27
Re: Changeing A Command - by oliverrud - 13.07.2010, 20:45
Re: Changeing A Command - by robert4049 - 13.07.2010, 20:49
Re: Changeing A Command - by oliverrud - 13.07.2010, 21:20
Re: Changeing A Command - by robert4049 - 13.07.2010, 21:24
Re: Changeing A Command - by robert4049 - 13.07.2010, 21:41
Re: Changeing A Command - by robert4049 - 14.07.2010, 00:32
Re: Changeing A Command - by CuervO - 14.07.2010, 00:36
Re: Changeing A Command - by robert4049 - 14.07.2010, 00:56
Re: Changeing A Command - by Dennis - 14.07.2010, 01:31

Forum Jump:


Users browsing this thread: 4 Guest(s)