public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_WALK && IsPlayerInAnyVehicle(playerid))
Kick(playerid);
new string[256];
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if ((newkeys==KEY_SUBMISSION)&&(IsPlayerInAnyVehicle( playerid))&&(GetPlayerState(playerid)==PLAYER_STAT E_DRIVER))
{
if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
{
if(PlayerInfo[playerid][BLicence] == 1)
{
if (busdriver[playerid]<0)
{
BusMission(playerid);
}
else
{
TerminarBusMission(playerid);
}
}
}
if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420)
{
if(PlayerInfo[playerid][TLicence] == 1)
{
if (playerInMiniMission[playerid]<0)
{
MissionIni(playerid);
}
else
{
terminarMission(playerid);
}
}
}
}
//---------------------------------[Gym Ganto]-------------------------------
if (newkeys==KEY_SECONDARY_ATTACK && PlayerToPoint(2,playerid,773.5,-1.0,1000.7))
{
if(walkgym==0)
{
SetPlayerPos(playerid,773.4,-2.5,1000.
;
SetPlayerFacingAngle(playerid,174.
;
TogglePlayerControllable(playerid,0);
StandWalk(playerid);
}
else
{
format(string,sizeof(string),"~r~This place is busy now!.");
GameTextForAll(string,3000,3);
}
}
if (newkeys==KEY_SPRINT && PlayerToPoint(1,playerid,773.4,-2.5,1000.
)
{
if (gymwalk[playerid]==1)
{
OffWalk();
}
}