Script HERE (the gm by stevo)
#1

hey guys stevo has made a great GM but it have engine that make it sucks
i want to quit that fking engine does any one know how to quit it what i delete or what i do plz +rep if u help me

i tryed delete onplayerkeystatechange
it complie
with no errors
but server won't work
-_- please help
Reply
#2

What are you saying? Provide some code so we can help out
Reply
#3

here : OnPlayerStateChange

Quote:

public OnPlayerStateChange(playerid, newstate, oldstate)
{
new pname[24];
new string[128];
GetPlayerName(playerid,pname,sizeof(pname));

//Save Last Vehicle ID (Detain)
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
if(engine != VEHICLE_PARAMS_ON && !IsAPlane(vid) && !IsACycleBike(vid))
{
SendClientMessage(playerid,COLOR_DODGERBLUE,"To turn on the vehicle engine type /engineon or press 2.");
}
if(engine != VEHICLE_PARAMS_ON && IsAPlane(vid) && !IsACycleBike(vid))
{
SendClientMessage(playerid,COLOR_DODGERBLUE,"To turn on a plane engine type /engineon.");
}
if(engine != VEHICLE_PARAMS_ON && IsACycleBike(vid))
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,al arm,doors,bonnet,boot,objective);
}
LastVehicle[playerid] =GetPlayerVehicleID(playerid);
}

if(newstate == PLAYER_STATE_DRIVER)
{
new pveh =GetPlayerVehicleID(playerid);
if(VehicleInfo[pveh][bought] >= 0 && VehicleInfo[pveh][bought] <= MAX_PLAYERS_)
{
if(playerid == VehicleInfo[pveh][bought])
{
SendClientMessage(playerid,COLOR_LIME,"Welcome to your bought vehicle from Otto's Cars.");
return 1;
}
if(playerid != VehicleInfo[pveh][bought] && gTeam[playerid] != TEAM_CARJACK)
{
format(string,sizeof(string),"This vehicle is owned by %s(%d). You cannot drive it as you don't own it.",PlayerName(VehicleInfo[pveh][bought]),VehicleInfo[pveh][bought]);
SendClientMessage(playerid,COLOR_ERROR,string);
RemovePlayerFromVehicle(playerid);
return 1;
}
if(playerid != VehicleInfo[pveh][bought] && gTeam[playerid] == TEAM_CARJACK)
{
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Vehicle Stolen_]]");
format(string,sizeof(string),"You have stolen %s(%d)'s purchased vehicle from Otto's Cars!",PlayerName(VehicleInfo[pveh][bought]),VehicleInfo[pveh][bought]);
SendClientMessage(playerid,COLOR_ERROR,string);
IncreaseWantedLevel(playerid,6);
IncreasePlayerScore(playerid,2);

format(string,sizeof(string),"Car Jacker %s(%d) has stolen your purchased vehicle from Otto's Cars!",PlayerName(playerid),playerid);
SendClientMessage(VehicleInfo[pveh][bought],COLOR_RED,string);

format(string,sizeof(string),"[VEHICLE THEFT] Car Jacker %s(%d) has stolen %s(%d)'s purchased vehicle from Otto's Cars!",PlayerName(playerid),playerid,PlayerName(Ve hicleInfo[pveh][bought]),VehicleInfo[pveh][bought]);
SendClientMessageToAll(COLOR_RED,string);

format(string,sizeof(string),"[POLICE RADIO] Theft: Car Jacker %s(%d) has stolen %s(%d)'s purchased vehicle from Otto's Cars!",PlayerName(playerid),playerid,PlayerName(Ve hicleInfo[pveh][bought]),VehicleInfo[pveh][bought]);
SendClientMessageToAllCops(string);

VehicleInfo[pveh][bought] =playerid;
VehicleInfo[pveh][stolen] =1;
return 1;
}
}
}

if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(CIAIsBeingWatched[playerid] == 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(CIAPlayerBeingViewed[i] == playerid)
{
new pveh =GetPlayerVehicleID(playerid);
PlayerSpectateVehicle(i,pveh);
}
}
}
if(IsBeingSpectated[playerid] == 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpectatingPlayer[i] == playerid)
{
new pveh =GetPlayerVehicleID(playerid);
PlayerSpectateVehicle(i,pveh);
}
}
}
}

if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
if(CIAIsBeingWatched[playerid] == 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(CIAPlayerBeingViewed[i] == playerid)
{
PlayerSpectatePlayer(i,playerid);
}
}
}
if(IsBeingSpectated[playerid] == 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpectatingPlayer[i] == playerid)
{
PlayerSpectatePlayer(i,playerid);
}
}
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == TaxiVehicle1 || GetPlayerVehicleID(playerid) == TaxiVehicle2 ||
GetPlayerVehicleID(playerid) == TaxiVehicle3 || GetPlayerVehicleID(playerid) == TaxiVehicle4 ||
GetPlayerVehicleID(playerid) == TaxiVehicle5 || GetPlayerVehicleID(playerid) == TaxiVehicle6 ||
GetPlayerVehicleID(playerid) == TaxiVehicle7 || GetPlayerVehicleID(playerid) == TaxiVehicle8 ||
GetPlayerVehicleID(playerid) == TaxiVehicle9 || GetPlayerVehicleID(playerid) == TaxiVehicle10 ||
GetPlayerVehicleID(playerid) == TaxiVehicle11 || GetPlayerVehicleID(playerid) == TaxiVehicle12 ||
GetPlayerVehicleID(playerid) == TaxiVehicle13 || GetPlayerVehicleID(playerid) == TaxiVehicle14)
{
if(gTeam[playerid] == TEAM_DRIVER && GetPlayerWantedLevel(playerid) == 0)
{
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Taxi Vehicle_]]");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcom e to your Taxi Company vehicle.");
OnDuty[playerid] =1;

format(string,sizeof(string),"[TAXI DUTY] %s(%d) is now on taxi duty. Call them with /taxi to get picked up at your location.",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_DARKOLIVEGREEN,string );

format(string,sizeof(string),"3[TAXI DUTY] %s(%d) is now on taxi duty. Call them with /taxi to get picked up at your location.",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
}
}

if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
if(OnDuty[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You are now off duty. Enter a taxi vehicle again to go on duty.");
OnDuty[playerid] =0;
return 1;
}
}

if(newstate == PLAYER_STATE_PASSENGER)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new pveh =GetPlayerVehicleID(playerid);
if(OnDuty[i] == 1)
{
if(GetPlayerVehicleID(i) == pveh)
{
if(HasTaxiFare[i] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"This taxi already has a fare, please find your own taxi.");
RemovePlayerFromVehicle(playerid);
return 1;
}
if(GetPlayerMoney(playerid) < SkillPrice[i])
{
SendClientMessage(playerid,COLOR_ERROR,"You cannot afford to pay the fare of this taxi.");
RemovePlayerFromVehicle(playerid);
return 1;
}
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Entered Taxi_]]");
format(string,sizeof(string),"You are now paying %s(%d) $%d a minute to take you to your destination.",PlayerName(i),i,SkillPrice[i]);
SendClientMessage(playerid,COLOR_DARKOLIVEGREEN,st ring);
PayingTaxi[playerid] =1;
HasTaxiFare[i] =playerid;

SendClientMessage(i,COLOR_DEADCONNECT,"[[_Fare Picked Up_]]");
format(string,sizeof(string),"You have picked up %s(%d) and are charging them $%d a minute to take them to their destination.",PlayerName(playerid),playerid,SkillP rice[i]);
SendClientMessage(i,COLOR_DARKOLIVEGREEN,string);
return 1;
}
}
}
}

if(newstate == PLAYER_STATE_ONFOOT)
{
if(PayingTaxi[playerid] == 1)
{
PayingTaxi[playerid] =0;
SendClientMessage(playerid,COLOR_ERROR,"You have left your taxi and have stopped paying the fare.");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HasTaxiFare[i] == playerid)
{
HasTaxiFare[i] =-1;
SendClientMessage(i,COLOR_ERROR,"Your taxi fare has left your vehicle and has stopped paying your fare.");
return 1;
}
}
return 1;
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == PoliceCar1 || GetPlayerVehicleID(playerid) == PoliceCar2 ||
GetPlayerVehicleID(playerid) == PoliceCar3 || GetPlayerVehicleID(playerid) == PoliceCar4 ||
GetPlayerVehicleID(playerid) == PoliceCar5 || GetPlayerVehicleID(playerid) == PoliceCar6 ||
GetPlayerVehicleID(playerid) == PoliceCar7 || GetPlayerVehicleID(playerid) == PoliceCar8 ||
GetPlayerVehicleID(playerid) == PoliceCar9 || GetPlayerVehicleID(playerid) == PoliceCar10 ||
GetPlayerVehicleID(playerid) == PoliceCar11 || GetPlayerVehicleID(playerid) == PoliceCar12 ||
GetPlayerVehicleID(playerid) == PoliceCar14 ||
GetPlayerVehicleID(playerid) == PoliceCar15 || GetPlayerVehicleID(playerid) == PoliceCar16 ||
GetPlayerVehicleID(playerid) == PoliceCar17 || GetPlayerVehicleID(playerid) == PoliceCar18 ||
GetPlayerVehicleID(playerid) == PoliceCar19 || GetPlayerVehicleID(playerid) == PoliceCar20 ||
GetPlayerVehicleID(playerid) == PoliceCar21 || GetPlayerVehicleID(playerid) == PoliceCar22 ||
GetPlayerVehicleID(playerid) == PoliceCar23 || GetPlayerVehicleID(playerid) == PoliceCar24 ||
GetPlayerVehicleID(playerid) == PoliceCar25 || GetPlayerVehicleID(playerid) == PoliceCar26 ||
GetPlayerVehicleID(playerid) == PoliceCar27 || GetPlayerVehicleID(playerid) == PoliceCar28 ||
GetPlayerVehicleID(playerid) == PoliceCar29 || GetPlayerVehicleID(playerid) == PoliceCar30 ||
GetPlayerVehicleID(playerid) == PoliceCar31 || GetPlayerVehicleID(playerid) == PoliceCar32 ||
GetPlayerVehicleID(playerid) == PoliceCar33 || GetPlayerVehicleID(playerid) == PoliceCar34 ||
GetPlayerVehicleID(playerid) == PoliceCar35 || GetPlayerVehicleID(playerid) == PoliceCar36 ||
GetPlayerVehicleID(playerid) == PoliceCar37 || GetPlayerVehicleID(playerid) == PoliceCar38 ||
GetPlayerVehicleID(playerid) == PoliceCar39 || GetPlayerVehicleID(playerid) == PoliceCar40 ||
GetPlayerVehicleID(playerid) == PoliceCar41 || GetPlayerVehicleID(playerid) == PoliceCar42 ||
GetPlayerVehicleID(playerid) == PoliceCar43 || GetPlayerVehicleID(playerid) == PoliceCar44 ||
GetPlayerVehicleID(playerid) == PoliceCar45 || GetPlayerVehicleID(playerid) == PoliceCar46 ||
GetPlayerVehicleID(playerid) == PoliceCar47)
{
if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA && gTeam[playerid] != TEAM_MEDIC)
{
new current_zone;
current_zone = player_zone[playerid];
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Law Enforcement Vehicle Theft_]]");
SendClientMessage(playerid,COLOR_RED,"You have stolen a Law Enforcement Vehicle. The police has been informed, watch out ..");
IncreaseWantedLevel(playerid,4);

format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has stolen a Law Enforcement Vehicle. Location: %s",pname,playerid,zones[current_zone][zone_name]);
SendClientMessageToAllCops(string);
return 1;
}
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Police Vehicle_]]");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcom e to your Police Personnel vehicle.");
return 1;
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == MedicVehicle1 || GetPlayerVehicleID(playerid) == MedicVehicle2 ||
GetPlayerVehicleID(playerid) == MedicVehicle3 || GetPlayerVehicleID(playerid) == MedicVehicle4 ||
GetPlayerVehicleID(playerid) == MedicVehicle5 || GetPlayerVehicleID(playerid) == MedicVehicle6 ||
GetPlayerVehicleID(playerid) == MedicVehicle7 || GetPlayerVehicleID(playerid) == MedicVehicle8 ||
GetPlayerVehicleID(playerid) == MedicVehicle9 || GetPlayerVehicleID(playerid) == MedicVehicle10)
{
if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA && gTeam[playerid] != TEAM_MEDIC)
{
new current_zone;
current_zone = player_zone[playerid];
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Medic Vehicle Theft_]]");
SendClientMessage(playerid,COLOR_RED,"You have stolen a Medic Vehicle. The police has been informed, watch out ..");
IncreaseWantedLevel(playerid,4);

format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has stolen a Medic Vehicle. Location: %s",pname,playerid,zones[current_zone][zone_name]);
SendClientMessageToAllCops(string);
return 1;
}
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Medic Vehicle_]]");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcom e to your Medic Personnel vehicle.");
return 1;
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == ArmyVehicle0 || GetPlayerVehicleID(playerid) == ArmyVehicle1 ||
GetPlayerVehicleID(playerid) == ArmyVehicle2 || GetPlayerVehicleID(playerid) == ArmyVehicle3 ||
GetPlayerVehicleID(playerid) == ArmyVehicle4 || GetPlayerVehicleID(playerid) == ArmyVehicle5 ||
GetPlayerVehicleID(playerid) == ArmyVehicle6 || GetPlayerVehicleID(playerid) == ArmyVehicle7 ||
GetPlayerVehicleID(playerid) == ArmyVehicle8 || GetPlayerVehicleID(playerid) == ArmyVehicle9 ||
GetPlayerVehicleID(playerid) == ArmyVehicle10 || GetPlayerVehicleID(playerid) == ArmyVehicle11 ||
GetPlayerVehicleID(playerid) == ArmyVehicle12 || GetPlayerVehicleID(playerid) == ArmyVehicle13 ||
GetPlayerVehicleID(playerid) == ArmyVehicle14 || GetPlayerVehicleID(playerid) == ArmyVehicle15 ||
GetPlayerVehicleID(playerid) == ArmyVehicle16 || GetPlayerVehicleID(playerid) == ArmyVehicle17 ||
GetPlayerVehicleID(playerid) == ArmyVehicle18 || GetPlayerVehicleID(playerid) == ArmyVehicle19 ||
GetPlayerVehicleID(playerid) == ArmyVehicle20 || GetPlayerVehicleID(playerid) == ArmyVehicle21 ||
GetPlayerVehicleID(playerid) == ArmyVehicle22)
{
if(gTeam[playerid] != TEAM_ARMY)
{
SendClientMessage(playerid,COLOR_ERROR,"Only Army Personnel can use the Army vehicles.");
RemovePlayerFromVehicle(playerid);
return 1;
}
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Army Vehicle_]]");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcom e to your Army Personnel vehicle.");
return 1;
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == CIAVehicle1 || GetPlayerVehicleID(playerid) == CIAVehicle2 ||
GetPlayerVehicleID(playerid) == CIAVehicle3 || GetPlayerVehicleID(playerid) == CIAVehicle4 ||
GetPlayerVehicleID(playerid) == CIAVehicle5 || GetPlayerVehicleID(playerid) == CIAVehicle6 ||
GetPlayerVehicleID(playerid) == CIAVehicle7 || GetPlayerVehicleID(playerid) == CIAVehicle8 ||
GetPlayerVehicleID(playerid) == CIAVehicle9 || GetPlayerVehicleID(playerid) == CIAVehicle10 ||
GetPlayerVehicleID(playerid) == CIAVehicle11 || GetPlayerVehicleID(playerid) == CIAVehicle12 ||
GetPlayerVehicleID(playerid) == CIAVehicle13 || GetPlayerVehicleID(playerid) == CIAVehicle14 ||
GetPlayerVehicleID(playerid) == CIAVehicle15 || GetPlayerVehicleID(playerid) == CIAVehicle16 ||
GetPlayerVehicleID(playerid) == CIAVehicle17 || GetPlayerVehicleID(playerid) == CIAVehicle18 ||
GetPlayerVehicleID(playerid) == CIAVehicle19)
{
if(gTeam[playerid] != TEAM_CIA)
{
SendClientMessage(playerid,COLOR_ERROR,"Only CIA Personnel can use the CIA vehicles.");
RemovePlayerFromVehicle(playerid);
return 1;
}
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_CIA Vehicle_]]");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcom e to your CIA Personnel vehicle.");
return 1;
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == FBIVehicle1 || GetPlayerVehicleID(playerid) == FBIVehicle2 ||
GetPlayerVehicleID(playerid) == FBIVehicle3 || GetPlayerVehicleID(playerid) == FBIVehicle4 ||
GetPlayerVehicleID(playerid) == FBIVehicle5 || GetPlayerVehicleID(playerid) == FBIVehicle6 ||
GetPlayerVehicleID(playerid) == FBIVehicle7 || GetPlayerVehicleID(playerid) == FBIVehicle8 ||
GetPlayerVehicleID(playerid) == FBIVehicle9 || GetPlayerVehicleID(playerid) == FBIVehicle10 ||
GetPlayerVehicleID(playerid) == FBIVehicle11 || GetPlayerVehicleID(playerid) == FBIVehicle12 ||
GetPlayerVehicleID(playerid) == FBIVehicle13 || GetPlayerVehicleID(playerid) == FBIVehicle14 ||
GetPlayerVehicleID(playerid) == FBIVehicle15 || GetPlayerVehicleID(playerid) == FBIVehicle16 ||
GetPlayerVehicleID(playerid) == FBIVehicle17)
{
if(GetPlayerSkin(playerid) != 286)
{
SendClientMessage(playerid,COLOR_ERROR,"Only FBI Personnel can use the FBI vehicles.");
RemovePlayerFromVehicle(playerid);
return 1;
}
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_FBI Vehicle_]]");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcom e to your FBI Personnel vehicle.");
return 1;
}
}

return 1;
}

-------------------------------------------------------------------------------------------------------------

and Now OnPlayerKeyStateChange
Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new string[128];
if(newkeys == KEY_LOOK_BEHIND) //Starting / Stoping vehicle engine
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON && !IsAPlane(vid) && !IsACycleBike(vid))
{
SpamStrings[playerid] +=2;
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid, COLOR_ERROR, "Please do not spam. Please wait before trying to turn on/off the engine again.");
return 0;
}
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetDistanceBetweenPlayers(playerid,i) < 10)
{
format(string,sizeof(string),"%s(%d) spins the vehicle's engine key and turns off the engine.",PlayerName(playerid),playerid);
SendClientMessage(i,COLOR_LIGHTBLUE,string);
}
}
return 1;
}
if(engine != VEHICLE_PARAMS_ON && !IsAPlane(vid) && !IsACycleBike(vid))
{
SpamStrings[playerid] +=2;
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid, COLOR_ERROR, "Please do not spam. Please wait before trying to turn on/off the engine again.");
return 0;
}
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,al arm,doors,bonnet,boot,objective);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetDistanceBetweenPlayers(playerid,i) < 10)
{
format(string,sizeof(string),"%s(%d) spins the vehicle's engine key and turns on the engine.",PlayerName(playerid),playerid);
SendClientMessage(i,COLOR_LIGHTBLUE,string);
}
}
return 1;
}
}
return 1;
}


if(newkeys & KEY_SECONDARY_ATTACK && PlayerToPoint(1.0, playerid, -1619.1694,689.5911,7.1875)) //SFPD Shutter Inside
{
if(gTeam[playerid] != TEAM_CIA && gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY)
{
SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
return 1;
}
SpamStrings[playerid] +=2;
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid, COLOR_ERROR, "Please do not spam. Please wait before opening/closing again.");
return 0;
}
SetPlayerPos(playerid, -1619.1694,689.5911,7.1875);
SetPlayerFacingAngle(playerid, 269.9927);
LoopingAnim(playerid, "HEIST9", "Use_SwipeCard", 3.0, 0, 0, 0, 0, 0);
if(SFPDShutterOpen == 0)
{
MoveObject(SFPDShutter, -1620.61669922,688.17712402,12.80728531, 4);
SendClientMessage(playerid, COLOR_DODGERBLUE, "Access Granted");
SFPDShutterOpen =1;
return 1;
}
if(SFPDShutterOpen == 1)
{
MoveObject(SFPDShutter, -1620.61669922,688.17712402,7.80728531, 4);
SFPDShutterOpen =0;
return 1;
}
return 1;
}

if(newkeys & KEY_SECONDARY_ATTACK && PlayerToPoint(1.0, playerid, -1622.1335,687.1992,7.1875)) //SFPD Shutter Outside
{
if(gTeam[playerid] != TEAM_CIA && gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY)
{
SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
return 1;
}
SpamStrings[playerid] +=2;
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid, COLOR_ERROR, "Please do not spam. Please wait before opening/closing again.");
return 0;
}
SetPlayerPos(playerid, -1622.1335,687.1992,7.1875);
SetPlayerFacingAngle(playerid, 0.2336);
LoopingAnim(playerid, "HEIST9", "Use_SwipeCard", 3.0, 0, 0, 0, 0, 0);
if(SFPDShutterOpen == 0)
{
MoveObject(SFPDShutter, -1620.61669922,688.17712402,12.80728531, 4);
SendClientMessage(playerid, COLOR_DODGERBLUE, "Access Granted");
SFPDShutterOpen =1;
return 1;
}
if(SFPDShutterOpen == 1)
{
MoveObject(SFPDShutter, -1620.61669922,688.17712402,7.80728531, 4);
SFPDShutterOpen =0;
return 1;
}
return 1;
}

if(newkeys & KEY_SECONDARY_ATTACK && PlayerToPoint(1.0, playerid, 245.3787,73.5715,1003.6406)) //FBI Shutter Inside
{
if(GetPlayerSkin(playerid) != 286)
{
SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
return 1;
}
SpamStrings[playerid] +=2;
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid, COLOR_ERROR, "Please do not spam. Please wait before opening/closing again.");
return 0;
}
SetPlayerPos(playerid, 245.3787,73.5715,1003.6406);
SetPlayerFacingAngle(playerid, 91.2136);
LoopingAnim(playerid, "HEIST9", "Use_SwipeCard", 3.0, 0, 0, 0, 0, 0);
if(FBIShutterOpen == 0)
{
MoveObject(FBIShutter, 246.42794800,72.70855713,1009.26043701, 3);
SendClientMessage(playerid, COLOR_DODGERBLUE, "Access Granted");
FBIShutterOpen =1;
return 1;
}
if(FBIShutterOpen == 1)
{
MoveObject(FBIShutter, 246.42794800,72.70855713,1004.26043701, 3);
FBIShutterOpen =0;
return 1;
}
return 1;
}

if(newkeys & KEY_SECONDARY_ATTACK && PlayerToPoint(1.0, playerid, 247.7420,71.6222,1003.6406)) //FBI Shutter Outside
{
if(GetPlayerSkin(playerid) != 286)
{
SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
return 1;
}
SpamStrings[playerid] +=2;
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid, COLOR_ERROR, "Please do not spam. Please wait before opening/closing again.");
return 0;
}
SetPlayerPos(playerid, 247.7420,71.6222,1003.6406);
SetPlayerFacingAngle(playerid, 3.792;
LoopingAnim(playerid, "HEIST9", "Use_SwipeCard", 3.0, 0, 0, 0, 0, 0);
if(FBIShutterOpen == 0)
{
MoveObject(FBIShutter, 246.42794800,72.70855713,1009.26043701, 3);
SendClientMessage(playerid, COLOR_DODGERBLUE, "Access Granted");
FBIShutterOpen =1;
return 1;
}
if(FBIShutterOpen == 1)
{
MoveObject(FBIShutter, 246.42794800,72.70855713,1004.26043701, 3);
FBIShutterOpen =0;
return 1;
}
return 1;
}
return 1;
}

please help
Reply
#4

Well, since you know where the code snippet is, you could try to comment some part of the code.
Reply
#5

i did but
wheni delete the gm complie with no errors and in game
when i enter the car
it dont move no engine or nothing please help
Reply
#6

Check gamemodeinit ffs. Dont start off by editing gamemodes, start with filterscripts. Oh, and would you mind to read the rules too?
Reply
#7

listen bro this gm have no FS's
Reply
#8

That's cool bro, but bro, doesn't mean you shouldn't have to read the rules, bro
Reply
#9

Remove this, ManualVehicleEngineAndLights(); from OnGameModeInit / OnFilterScirptInit
Reply
#10

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Remove this, ManualVehicleEngineAndLights(); from OnGameModeInit / OnFilterScirptInit
oh MAn u helped me it works Thank U SO much and when my server be online u are invited to be admin there :d thank u so much it workd

DDD

+rep
s
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)