public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(!ispassenger) { foreach (Player,i) { if(GetPlayerVehicleID(i) == vehicleid && GetPlayerState(i) == PLAYER_STATE_DRIVER) { ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); SetVehicleParamsForPlayer(vehicleid,playerid,0,1); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); SendClientMessage(playerid,COLOR_GREY,"Alguien esta manejado este vehiculo."); LockCar[playerid][0] = 3; LockCar[playerid][1] = vehicleid; ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); } } } if (IsACopCar(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember] != 1) { ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); SetVehicleParamsForPlayer(vehicleid,playerid,0,1); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); SendClientMessage(playerid,COLOR_GREY,"Este vehiculo es solamente para los policias"); LockCar[playerid][0] = 3; LockCar[playerid][1] = vehicleid; ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); } } else if (IsAnAmbulance(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember] != 4) { ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); SetVehicleParamsForPlayer(vehicleid,playerid,0,1); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); SendClientMessage(playerid,COLOR_GREY,"Este auto es de EMT."); LockCar[playerid][0] = 3; LockCar[playerid][1] = vehicleid; ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); } } else if(IsAnOwnableCar(vehicleid) && CarInfo[VehicleOwned[vehicleid]][cLock] == 1) { if(AdminDuty[playerid] == 0) { ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); SetVehicleParamsForPlayer(vehicleid,playerid,0,1); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); SendClientMessage(playerid,COLOR_GREY,"Este auto esta cerrado."); LockCar[playerid][0] = 3; LockCar[playerid][1] = vehicleid; ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0); } } if(IsNotAEngineCar(vehicleid)) { TogVehicleEngine(vehicleid, 1); } return 1; } |
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger)
{
foreach (Player,i)
{
if(GetPlayerVehicleID(i) == vehicleid && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
SendClientMessage(playerid,COLOR_GREY,"Alguien esta manejado este vehiculo.");
LockCar[playerid][0] = 3;
LockCar[playerid][1] = vehicleid;
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}
}
}
if (IsACopCar(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pMember] != 1)
{
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
SendClientMessage(playerid,COLOR_GREY,"Este vehiculo es solamente para los policias");
LockCar[playerid][0] = 3;
LockCar[playerid][1] = vehicleid;
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}
}
else if (IsAnAmbulance(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pMember] != 4)
{
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
SendClientMessage(playerid,COLOR_GREY,"Este auto es de EMT.");
LockCar[playerid][0] = 3;
LockCar[playerid][1] = vehicleid;
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}
}
else if(IsAnOwnableCar(vehicleid) && CarInfo[VehicleOwned[vehicleid]][cLock] == 1)
{
if(AdminDuty[playerid] == 0)
{
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
SendClientMessage(playerid,COLOR_GREY,"Este auto esta cerrado.");
LockCar[playerid][0] = 3;
LockCar[playerid][1] = vehicleid;
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}
}
if(IsNotAEngineCar(vehicleid))
{
TogVehicleEngine(vehicleid, 1);
}
return 1;
}