24.09.2015, 18:27
Deberнas comprobar en quй VW estб el jugador, quedando algo asн.
pawn Код:
if(strcmp(cmd, "/parking", true) == 0) //Entrar a un parking pъblico o privado
{
new coche = GetPlayerVehicleID(playerid);
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1764.6896,-2031.9556,14.0931)) //Parking Taller LS 1
{
SetVehiclePos(coche, 614.0005, -74.8299, 997.9922);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 0);
LinkVehicleToInteriorEx(coche, 2);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 2);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 1614.0005, -74.8299, 997.99221) && GetPlayerVirtualWorld(playerid) == 0) //Parking Taller LS 1 SALIDA
{
SetVehiclePos(coche, 1768.8580,-2031.7891,13.5896);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 0);
LinkVehicleToInteriorEx(coche, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 1764.6918,-2048.8484,14.1053)) //Parking Taller LS 2
{
SetVehiclePos(coche, 614.0005, -74.8299, 997.9922);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 1);
LinkVehicleToInteriorEx(coche, 2);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerInterior(playerid, 2);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 614.0005, -74.8299, 997.9922) && GetPlayerVirtualWorld(playerid) == 1) //Parking Taller LS 2 Salida
{
SetVehiclePos(coche, 1764.6918,-2048.8484,14.1053);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 0);
LinkVehicleToInteriorEx(coche, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 1751.4443,-2053.9902,14.1225)) //Parking Taller LS 3
{
SetVehiclePos(coche, 614.0005, -74.8299, 997.9922);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 2);
LinkVehicleToInteriorEx(coche, 2);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerInterior(playerid, 2);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 614.0005, -74.8299, 997.9922) && GetPlayerVirtualWorld(playerid) == 2) //Parking Taller LS 3 SALIDA
{
SetVehiclePos(coche, 1751.4443,-2053.9902,14.1225);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 0);
LinkVehicleToInteriorEx(coche, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 1768.6816,-2019.7382,14.1368)) //Parking Taller LS 4
{
SetVehiclePos(coche, 614.0005, -74.8299, 997.9922);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 3);
LinkVehicleToInteriorEx(coche, 2);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerInterior(playerid, 2);
}
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 614.0005, -74.8299, 997.9922) && GetPlayerVirtualWorld(playerid) == 3) //Parking Taller LS 4 SALIDA
{
SetVehiclePos(coche, 1768.6816,-2019.7382,14.1368);
SetVehicleZAngle(coche, 270);
SetVehicleVirtualWorld(coche, 0);
LinkVehicleToInteriorEx(coche, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
else
{
SendClientMessage(playerid, Rojo, "* No estбs en la puerta de un parking.");
return 1;
}
return 1;
}