Command in FS
#1

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
Reply
#2

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.
Reply
#3

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

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....
Reply
#5

what should I do?
Reply
#6

any help
Reply
#7

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

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

Код:
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;
   }
}
Reply
#9

still does not work . Does Fs can not use commands
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)