/engine problem - 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: /engine problem (
/showthread.php?tid=150857)
/engine problem -
hardstop - 28.05.2010
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMootor] == 0)
{
if(newkeys == KEY_JUMP)
{
PlayerInfo[playerid][pMootor] = 2;
SetTimerEx("KaivitaMootor", 3000, 0, "i", playerid);
new string2[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "* %s ьritab mootorit kдivitada ", pname);
SendLocalMessage(playerid, LILLA, 7, string2);
}
}
if(newkeys == KEY_SECONDARY_ATTACK)
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
everything is ok but you can turn the engine on even if the car is buyable car,
how can i make that you cant start the engine of buyable cars?
btw im using godfather car system on blank gm
Re: /engine problem -
Hiddos - 28.05.2010
pawn Code:
if(GetPlayerVehicleID(playerid) != buyable)
Or something like that. Anyways, use an 'if()' thingy checker to check if he isn't in a buyable car.