SA-MP Forums Archive
Really need help! - 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: Really need help! (/showthread.php?tid=149405)



Really need help! - Antonio [G-RP] - 22.05.2010

Almost finished engine, but I have one more problem. When I do /engine in a "factioncar" it says "SERVER: Unknown command"

Code:

pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
{
new carid = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "You aren't in a vehicle!");
return 1;
}
if(CInfo[carid-1][cEngine] == 0)
{
OnPlayerCommandText(playerid, "/me spins the key and successfully starts the engine");
TogglePlayerControllable(playerid, 1);
CInfo[carid-1][cEngine] = 1;
return 1;
}
if(CInfo[carid-1][cEngine] == 1)
{
OnPlayerCommandText(playerid, "/me spins the key and shuts off the engine");
TogglePlayerControllable(playerid, 0);
CInfo[carid-1][cEngine] = 0;
return 1;
}
if(FactionCar[carid][fcFaction] != PlayerInfo[playerid][pFaction])
{
OnPlayerCommandText(playerid, "/me tries to start the engine, but fails");
SendClientMessage(playerid, COLOR_GREY, "You don't have the keys for this vehicle!");
return 1;
}
if(FactionCar[carid][fcEngine] == 0)
{
OnPlayerCommandText(playerid, "/me spins the key and successfully starts the engine");
TogglePlayerControllable(playerid, 1);
FactionCar[carid][fcEngine] = 1;
return 1;
}
if(FactionCar[carid][fcEngine] == 1)
{
OnPlayerCommandText(playerid, "/me spins the key and shuts off the engine");
TogglePlayerControllable(playerid, 0);
FactionCar[carid][fcEngine] = 0;
}
return 1;
}



Re: Really need help! - Bayler - 22.05.2010

same problem, and SAME solution as your other post...

http://forum.sa-mp.com/index.php?topic=174770.0


Re: Really need help! - Antonio [G-RP] - 22.05.2010

You really need to shut up


Re: Really need help! - Bayler - 22.05.2010

LMFAO ... ok NOW im enjoying this...

You can get pissy ALLL you want ..your problem is STILL the SAME, you just added more 'issues' to it from your previous topic.

If you Do:

Код:
if(IMaeRepeatMistakes == yes)
{
//Result return 1;
}
if(IMaeRepeatMistakes == no)
{

}
if(IMaeRepeatMistakes == maybe)
{
//Result return 1;
}
Ill say it again ... Its your IF statements... Try and Merge them

Код:
if(IMakeRepeatMistakes > yes && ImAnIdiot > yes)
{
// Ill Never Learn
return 1;
}



Re: Really need help! - Antonio [G-RP] - 22.05.2010

Quote:
Originally Posted by Bayler
LMFAO ... ok NOW im enjoying this...

You can get pissy ALLL you want ..your problem is STILL the SAME, you just added more 'issues' to it from your previous topic.

If you Do:

Код:
if(IMaeRepeatMistakes == yes)
{
//Result return 1;
}
if(IMaeRepeatMistakes == no)
{

}
if(IMaeRepeatMistakes == maybe)
{
//Result return 1;
}
Ill say it again ... Its your IF statements... Try and Merge them

Код:
if(IMakeRepeatMistakes > yes && ImAnIdiot > yes)
{
// Ill Never Learn
return 1;
}
Rofl

Ill try this tomorrow


Re: Really need help! - Steven82 - 22.05.2010

lol