10.11.2012, 20:52
My engine system is supposed to work with the jump key (left shift), but for some reason it doesn't... It works when I back up (down arrow)... What is wrong that causes this? How can I fix it to make it the jump (left shift) key?
Here is the script:
Thanks: jakejohnsonusa
Here is the script:
Код:
else if(PRESSED(KEY_JUMP))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
new idcar = GetPlayerVehicleID(playerid);
if(gEngine[idcar] == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
if(IsARentableCar(idcar))
{
if(HireCar[playerid] != idcar) return 1;
}
if(IsAHarvest(idcar)) return 1;
if(IsADrugHarvest(idcar)) return 1;
if(IsASweeper(idcar)) return 1;
if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999)
return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!");
format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SetTimerEx("StartingTheVehicle",3500,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Starting vehicle engine...",3500,3);
gEngine[idcar] = 1;
SetVehicleParamsEx(idcar, 1, 1, 0, 0, 0, 0, 0);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}
}
}
else if(!IsPlayerInAnyVehicle(playerid) && IsPlayerOnSpecialAction(playerid) == 0 || PlayerInfo[playerid][pAdminDuty] == 0)
{
if(AntiBunnyJump == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(GivingBlowjob[playerid] == 0 || GettingBlowjob[playerid] == 0)
{
if(BunnyJump[playerid] == 0)
{
BunnyJump[playerid] = 1;
ResetJumpTimer = SetTimerEx("ResetJump1",2000,0,"i",playerid);
}
else if(BunnyJump[playerid] == 1)
{
if(PlayerInfo[playerid][pAdminDuty] >= 1) return 1;
if(PlayerGotSpottedRecently[playerid] == 0)
{
PlayerSuspicious[playerid] = 1;
PlayerBunnyJumping[playerid] = 1;
PlayerGotSpottedRecently[playerid] = 1;
format(string, 128, "[ANTI-CHEAT]: %s (%d) is possibly bunny jumping, Go check him!!", sendername, playerid);
SendAdminMessage(COLOR_YELLOW, string);
SetTimerEx("ResetAcWarn", 600000, 0, "i", playerid);
}
PlayerBunnyJumped[playerid] ++;
KillTimer(ResetJumpTimer);
ResetJumpTimer = SetTimerEx("ResetJump1",2000,0,"i",playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has been Found Bunny jumping.",d,m,y,h,mi,s,sendername);
AdminLog(string);
return 1;
}
}
}
}
}

