[HELP] Call taxi problem. - 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] Call taxi problem. (
/showthread.php?tid=77340)
[HELP] Call taxi problem. -
Hot - 10.05.2009
I have this code from one job FS:
pawn Код:
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;
}
But, every unknown command on my server, I get this message:
Код:
Usage: /calltaxi [Location]
What's wrong? o.o
Re: [HELP] Call taxi problem. -
devil614 - 13.05.2009
Originally I said:
Did you include "strtok"?
Код:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
But then I noticed you are using "strmid"
Have you looked here?
https://sampwiki.blast.hk/wiki/Scripting...ons_Old#strmid