Command doesn't quite work.. - 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 doesn't quite work.. (
/showthread.php?tid=151035)
Command doesn't quite work.. -
Antonio [G-RP] - 29.05.2010
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;
}
Re: Command doesn't quite work.. -
Miguel - 29.05.2010
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;
}
Re: Command doesn't quite work.. -
Antonio [G-RP] - 29.05.2010
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?
Re: Command doesn't quite work.. -
Miguel - 29.05.2010
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?
Re: Command doesn't quite work.. -
Antonio [G-RP] - 29.05.2010
Im trying to use those to shut the engines off. See I have 2 scriptfiles, 1 for ownable cars and 1 for faction cars