Command doesn't quite work..
#1

The command runs through, but the engines don't turn off..

pawn Код:
if(strcmp(cmd, "/allenginesoff", true) == 0)
{
if(gAdminOnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");
return 1;
}
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 6 && PlayerInfo[playerid][pRealAdmin] == 1)
{
for(new v; v < MAX_VEHICLES; v++)
{
FactionCar[v][fcEngine] = 0;
CInfo[v][cEngine] = 0;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command");
}
return 1;
}
Reply
#2

No idea... Is it from your own script?

By the way, next time ident your code to help us...
pawn Код:
if(strcmp(cmd, "/allenginesoff", true) == 0)
{
  if(gAdminOnDuty[playerid] != 1) return SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");
  if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 6 && PlayerInfo[playerid][pRealAdmin] == 1)
  {
    for(new v; v < MAX_VEHICLES; v++)
    {
      FactionCar[v][fcEngine] = 0;
      CInfo[v][cEngine] = 0;
      return 1;
    }
  }
  else SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command");
  return 1;
}
Reply
#3

I learned to script non indenting.. it kind of pisses me off but to change my whole script would be a pain in the ass.

Anyways, this is from my own script..

Any help?
Reply
#4

pawn Код:
FactionCar[v][fcEngine] = 0;
CInfo[v][cEngine] = 0;
What would that turn the vehicle's engine off... I mean, where are you using those variables?
Reply
#5

Im trying to use those to shut the engines off. See I have 2 scriptfiles, 1 for ownable cars and 1 for faction cars
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)