SA-MP Forums Archive
Command in FS - 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: Command in FS (/showthread.php?tid=135946)



Command in FS - MrLeNy - 22.03.2010

Hello. I create just FS'a running vehicles, but when I enter the command / mycars nothing happens, as if the command was not there. And it is designed to show me a list of my vehicles. Here it is:

Код:
if(strcmp(cmdtext, "/mycars", true) == 0)
{
new string[255];
for(new v = 0; v < MAX_CARS; v++)
{
if(strcmp(PlayerName(playerid), CarInfo[v][cOwner], true) == 0)
{
format(string, sizeof(string),"%s", NazwyPojazdow[GetVehicleModel(v) - 400]);
SendClientMessage(playerid, 0xA4A4A4FF, string);
}
}
return 1;
}
Please Help


Re: Command in FS - marharth - 22.03.2010

Your FS commands are overlapping with your gm ones....

Not sure how to fix this, has to do with returns i think...

I normally don't script fses so I don't know much about it, but try to check your returns.


Re: Command in FS - MrLeNy - 22.03.2010

but how to change return 1; the return 0; it's not going to happen.


Re: Command in FS - marharth - 22.03.2010

Quote:
Originally Posted by MrLeNy
but how to change return 1; the return 0; it's not going to happen.
What is your full filter-script?

I am pretty sure no commands in that filter-script will work....


Re: Command in FS - MrLeNy - 22.03.2010

what should I do?


Re: Command in FS - MrLeNy - 23.03.2010

any help


Re: Command in FS - adsy - 23.03.2010

each if should return 1 and the end of onplayercommandtext should return 0;

Код:
opct(){
ifstrcmp{
return 1;
}
return 0;
}



Re: Command in FS - Joe_ - 23.03.2010

Код:
if(strcmp(cmdtext, "/mycars", true) == 0)
{
   new string[128]; // No need for a string lenght of 256. 128 is the maximum string lenght to be sent via client message.
   for(new v = 0; v < MAX_CARS; v++)
   {
      if(strcmp(PlayerName(playerid), CarInfo[v][cOwner], true) == 0)
      {
          format(string, sizeof(string),"%s", NazwyPojazdow[GetVehicleModel(v) - 400]);
          SendClientMessage(playerid, 0xA4A4A4FF, string);
      }
      return 1;
   }
}



Re: Command in FS - MrLeNy - 29.03.2010

still does not work . Does Fs can not use commands