08.07.2011, 07:51
I'll take a look.
EDIT: Now it should work.
Find OnPlayerKeyStateChange, and replace Line 49460 to 49532 with:
EDIT: Now it should work.
Find OnPlayerKeyStateChange, and replace Line 49460 to 49532 with:
pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
new newcar = GetPlayerVehicleID(playerid);
if(newkeys == KEY_JUMP)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInAnyVehicle(i))
{
if(IsPlayerConnected(i))
{
if(!engineOn[GetPlayerVehicleID(i)])
{
if(GetPlayerState(i) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(IsAnOwnableCar(newcar))
{
if(PlayerInfo[playerid][pPcarkey] == newcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == newcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == newcar) { }
else if(PlayerInfo[playerid][pDublicateKey1] == newcar) { }
else if(PlayerInfo[playerid][pDublicateKey2] == newcar) { }
else { return 1; }
}
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
{
return 1;
}
if(newcar == 59 || newcar == 60)
{
return 1;
}
if(newcar >= 135 && newcar <= 154)
{
if(HireCar[playerid] != newcar)
{
return 1;
}
}
if(IsAHarvest(newcar))
{
return 1;
}
if(IsADrugHarvest(newcar))
{
return 1;
}
if(IsASweeper(newcar))
{
return 1;
}
if(gEngine[playerid] == 1) { return 1; }
// new playerveh = GetPlayerVehicleID(playerid);
PutPlayerInVehicle(playerid, newcar, 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername, "_")] = ' ';
format(string, sizeof(string), "* %s pagrieю atslзgu un mзмina pielaist maроnas motoru.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("StartingTheVehicle",3500,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Iedarbina motoru...",3500,3);
gEngine[playerid] = 1;
return 1;
}
}
}
}
}