if(MissionActive == 2)
{
if(PlayerIsDoingMission == INVALID_PLAYER_ID)
{
ResetMissions();
if(city == 1){SearchedVehicle = MAX_HOUSES+random(sizeof(RandomVehicles_LS)-MAX_HOUSES);} // Avoid housecars and planes can be 'searched'
RandomCarMissionMoney = MinCarMissionMoney+random(MaxCarMissionMoney-MinCarMissionMoney);
format(string, sizeof(string), "Mission: Car Export! Find the %s at the red marker, Worth: %d$", VehicleName[GetVehicleModel(SearchedVehicle)-400], RandomCarMissionMoney);
SendClientMessageToAll(COLOR_YELLOW, string);
new Float:vehx, Float:vehy, Float:vehz;
new Float:ratio = 4.0;
GetVehiclePos(SearchedVehicle, vehx, vehy, vehz);
for(new i=0; i<MAX_SLOTS; i++)
{
SetPlayerCheckpoint(i, vehx, vehy, vehz, ratio); // lemme see
romeo[i]= 1;
if(!IsPlayerInVehicle(i, SearchedVehicle))
{
SetVehicleParamsForPlayer(SearchedVehicle, i, 1, 0);
}
else
{
SetVehicleParamsForPlayer(SearchedVehicle, i, 0, 0);
}
}
AllPlaySound(1139);
}
}
public OnPlayerEnterVehicle(playerid,vehicleid)
{
if(vehicleid == 123) // Switch 123 to your vehicle ID
{
if(gTeam[playerid] == TEAM_COP) // or GetPlayerTeam
{
return SendClientMessage(playerid,COLOR,"You are cop. You must defend this vehicle from stealers!");
}
else
{
return 1;
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 123) // Switch 123 to your vehicle ID
{
if(gTeam[playerid] == TEAM_COP) // or GetPlayerTeam
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X+2,Y,Z);
SendClientMessage(playerid,COLOR,"You are cop. You must defend this vehicle from stealers!");
return 1;
}
else
{
return 1;
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 123) // Switch 123 to your vehicle ID
{
if(gTeam[playerid] == TEAM_COP) // or GetPlayerTeam
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X+2,Y,Z);
SendClientMessage(playerid,COLOR_GREY,"You are cop. You must defend this vehicle from stealers!");
return 1;
}
else
{
return 1;
}
}
return 1;
if(GetVehicleModel(vehicleid) == 449){PutPlayerInVehicle(playerid, vehicleid, 0);} // Tram
//if(GetVehicleModel(vehicleid) == 537){PutPlayerInVehicle(playerid, vehicleid, 0);} // Freight // There are no bugs with trains.
//if(GetVehicleModel(vehicleid) == 538){PutPlayerInVehicle(playerid, vehicleid, 0);} // Streak // There are no bugs with trains.
//if(GetVehicleModel(vehicleid) == 570){if(ispassenger == 1){PutPlayerInVehicle(playerid, vehicleid, ispassenger);}} // Streak Carriage // This public doesn't support Carriage's
//if(GetVehicleModel(vehicleid) == 590){if(ispassenger == 1){PutPlayerInVehicle(playerid, vehicleid, ispassenger);}} // Freibox Carriage // This public doesn't support Carriage's
if(GetVehicleModel(vehicleid) == 441){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Bandit
if(GetVehicleModel(vehicleid) == 464){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Baron
if(GetVehicleModel(vehicleid) == 465){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Raider
if(GetVehicleModel(vehicleid) == 501){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Goblin
if(GetVehicleModel(vehicleid) == 564){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Tiger
if(GetVehicleModel(vehicleid) == 594){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Cam
return 1;
}
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(13832) : warning 225: unreachable code
if(GetVehicleModel(vehicleid) == 449){PutPlayerInVehicle(playerid, vehicleid, 0);} // Tram
It works thank you, but i have a problem it gives me 1 warning here is my OnPlayerEnterVehicle :
pawn Код:
pawn Код:
pawn Код:
|
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 123) // Switch 123 to your vehicle ID
{
if(gTeam[playerid] == TEAM_COP) // or GetPlayerTeam
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X+2,Y,Z);
SendClientMessage(playerid,COLOR_GREY,"You are cop. You must defend this vehicle from stealers!");
return 1;
}
else
{
return 1;
}
}
if(GetVehicleModel(vehicleid) == 449){PutPlayerInVehicle(playerid, vehicleid, 0);} // Tram
//if(GetVehicleModel(vehicleid) == 537){PutPlayerInVehicle(playerid, vehicleid, 0);} // Freight // There are no bugs with trains.
//if(GetVehicleModel(vehicleid) == 538){PutPlayerInVehicle(playerid, vehicleid, 0);} // Streak // There are no bugs with trains.
//if(GetVehicleModel(vehicleid) == 570){if(ispassenger == 1){PutPlayerInVehicle(playerid, vehicleid, ispassenger);}} // Streak Carriage // This public doesn't support Carriage's
//if(GetVehicleModel(vehicleid) == 590){if(ispassenger == 1){PutPlayerInVehicle(playerid, vehicleid, ispassenger);}} // Freibox Carriage // This public doesn't support Carriage's
if(GetVehicleModel(vehicleid) == 441){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Bandit
if(GetVehicleModel(vehicleid) == 464){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Baron
if(GetVehicleModel(vehicleid) == 465){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Raider
if(GetVehicleModel(vehicleid) == 501){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Goblin
if(GetVehicleModel(vehicleid) == 564){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Tiger
if(GetVehicleModel(vehicleid) == 594){PutPlayerInVehicle(playerid, vehicleid, 0);} // RC-Cam
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 123) // Switch 123 to your vehicle ID
{
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)) // or GetPlayerTeam
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X+2,Y,Z);
SendClientMessage(playerid,COLOR_GREY,"You must defend this vehicle from stealers!");
return 1;
}
else
{
return 1;
}
}
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2)) // or GetPlayerTeam
else