SA-MP Forums Archive
Help Me Please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help Me Please (/showthread.php?tid=97034)



Help Me Please - GforceNL - 12.09.2009

When I type a command Does not matter what command i get a message..
USAGE: /calltaxi [Location]

How can i fix it This is the /calltaxi Command:

Код:
	if(strcmp(cmd, "/calltaxi", true) == 0) {
		new string[256];
		new message[256];
		new playername[256];
 		strmid(message, cmdtext, 8, strlen(cmdtext));
 		GetPlayerName(playerid, playername, sizeof(playername));
  	if(!strlen(message)) {
			SendClientMessage(playerid, COLOR_RED, "Usage: /calltaxi [Location]");
			return 1;
		}
		format(string, sizeof(string), "%s Needs a Taxi at %s", playername,message);
		SendTaxiReadyMessage(COLOR_BLUE,string);
		
		return 1;
	}



Re: Help Me Please - Finn - 12.09.2009

strmid(message, cmdtext, 8, strlen(cmdtext));

I guess that value should be the lenght of "/calltaxi", which is 9, not 8.