SA-MP Forums Archive
Still can't get this command straight - 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: Still can't get this command straight (/showthread.php?tid=149605)



Still can't get this command straight - Antonio [G-RP] - 22.05.2010

Any help, please ?

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(IsOwnable(carid-1) && 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;
}
else
{
OnPlayerCommandText(playerid, "/me spins the key and successfully starts the engine");
TogglePlayerControllable(playerid, 1);
CInfo[carid-1][cEngine] = 1;
return 1;
}
if(FactionCar[carid][fcFaction] != 0 && 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;
}
else if(!IsOwnable(carid) && FactionCar[carid][fcEngine] == 1)
{
OnPlayerCommandText(playerid, "/me spins the key and shuts off the engine");
TogglePlayerControllable(playerid, 0);
FactionCar[carid][fcEngine] = 0;
return 1;
}
else
{
OnPlayerCommandText(playerid, "/me spins the key and successfully starts the engine");
TogglePlayerControllable(playerid, 1);
FactionCar[carid][fcEngine] = 1;
}
return 1;
}



Re: Still can't get this command straight - Bayler - 22.05.2010

So you create a duplicate topic, with a new title ? ? ?

See your previous Topic Solution is in there..unless your expecting for someone to DO IT FOR YOU, in which case, you should post in the Script Request Forum


Re: Still can't get this command straight - Antonio [G-RP] - 22.05.2010

Its not a script request, and the script is differnt, therefore its not the SAME question. I'm looking for somebody to give me a quick fix, not complain, like you