Mejorar esto...
#1

Hace tiempo Zume me habнa ayudado con un sistema para parking, y funciona bien mбs cuando entras sin un vehнculo, osea que colocas el comando /parking y entras sin estar en un vehнculo no te mandar a ningъn lugar, se bugea todo el personaje їcуmo se soluciona eso que tambiйn funcione bien si entras sin vehнculo? ya que como los jugadores buscarбn los vehнculos que dejen aparcados.. este es el codigo:

Код:
enum Parking{
    Float:parkPosX,
    Float:parkPosY,
    Float:parkPosZ,
    Float:parkPosA,
    parkINTExt,
    parkVWExt,

    Float:parkPosXX,
    Float:parkPosYY,
    Float:parkPosZZ,
    Float:parkPosAA,
    parkINTInt,
};

static ParkInfo[][Parking] = {
    // EXTERIOR                                - INTERIOR
    // X        Y           Z        A  INT VW  XX        YY        ZZ        A      INT
    {1768.0229, -2032.0867, 13.6906, 0.0, 0, 0, 614.0005, -74.8299, 997.9922, 270.0, 2},     // Parking Taller LS 1
    {1769.4469, -2049.0681, 13.5616, 0.0, 0, 0, 614.0005, -74.8299, 997.9922, 270.0, 2},     // Parking Taller LS 2
    {1751.6825, -2059.5466, 13.5931, 0.0, 0, 0, 614.0005, -74.8299, 997.9922, 270.0, 2},     // Parking Taller LS 3
    {1769.0739, -2022.8633, 14.1460, 0.0, 0, 0, 614.0005, -74.8299, 997.9922, 270.0, 2}     // Parking Taller LS 4
};

if(strcmp(cmd, "/parking", true) == 0) //Entrar a un parking pъblico o privado
{

    new
        vehicleid = GetPlayerVehicleID(playerid),
        id = -1;

    if((id = PlayerIsNearParking(playerid)) != -1)
    {
        SetVehiclePos(vehicleid, ParkInfo[id][parkPosXX], ParkInfo[id][parkPosYY], ParkInfo[id][parkPosZZ]);
	    SetVehicleZAngle(vehicleid, ParkInfo[id][parkPosAA]);
        SetVehicleVirtualWorld(vehicleid, id + 20);
        SetPlayerVirtualWorld(playerid, id + 20);
        LinkVehicleToInteriorEx(vehicleid, ParkInfo[id][parkINTInt]);
        SetPlayerInterior(playerid, ParkInfo[id][parkINTInt]);
    }
    else if((id = PlayerIsNearExitParking(playerid)) != -1){
        SetVehiclePos(vehicleid, ParkInfo[id][parkPosX], ParkInfo[id][parkPosY], ParkInfo[id][parkPosZ]);
        SetVehicleZAngle(vehicleid, ParkInfo[id][parkPosA]);
        SetVehicleVirtualWorld(vehicleid, ParkInfo[id][parkVWExt]);
        SetPlayerVirtualWorld(playerid, ParkInfo[id][parkVWExt]);
        LinkVehicleToInteriorEx(vehicleid, ParkInfo[id][parkINTExt]);
        SetPlayerInterior(playerid, ParkInfo[id][parkINTExt]);
    }
    else
    {
        SendClientMessage(playerid, Rojo, "* No estбs en la puerta de un parking.");
    }
    return 1;
}
Reply
#2

Код:
if(strcmp(cmd, "/parking", true) == 0) //Entrar a un parking pъblico o privado
{

    new
        vehicleid = GetPlayerVehicleID(playerid),
        id = -1;

    if((id = PlayerIsNearParking(playerid)) != -1)
    {
        if(IsPlayerInAnyVehicle(playerid))
		{
		SetVehiclePos(vehicleid, ParkInfo[id][parkPosXX], ParkInfo[id][parkPosYY], ParkInfo[id][parkPosZZ]);
	    SetVehicleZAngle(vehicleid, ParkInfo[id][parkPosAA]);
        SetVehicleVirtualWorld(vehicleid, id + 20);
        LinkVehicleToInteriorEx(vehicleid, ParkInfo[id][parkINTInt]);
        }
        else
        {
        SetPlayerPos(playerid,ParkInfo[id][parkPosXX], ParkInfo[id][parkPosYY], ParkInfo[id][parkPosZZ]);
        }
        SetPlayerVirtualWorld(playerid, id + 20);
        SetPlayerInterior(playerid, ParkInfo[id][parkINTInt]);
    }
    else if((id = PlayerIsNearExitParking(playerid)) != -1){
    	if(IsPlayerInAnyVehicle(playerid))
		{
        SetVehiclePos(vehicleid, ParkInfo[id][parkPosX], ParkInfo[id][parkPosY], ParkInfo[id][parkPosZ]);
        SetVehicleZAngle(vehicleid, ParkInfo[id][parkPosA]);
        SetVehicleVirtualWorld(vehicleid, ParkInfo[id][parkVWExt]);
        LinkVehicleToInteriorEx(vehicleid, ParkInfo[id][parkINTExt]);
        }
        else
        {
        SetPlayerPos(playerid,ParkInfo[id][parkPosXX], ParkInfo[id][parkPosYY], ParkInfo[id][parkPosZZ]);
        }
        SetPlayerVirtualWorld(playerid, ParkInfo[id][parkVWExt]);
        SetPlayerInterior(playerid, ParkInfo[id][parkINTExt]);
    }
    else
    {
        SendClientMessage(playerid, Rojo, "* No estбs en la puerta de un parking.");
    }
    return 1;
}
Reply
#3

Que patйtico, pregunta y se responde con su otra cuenta

їAcaso crees que le tiramos piedras a los aviones? No somos boludos, Fagrinht, Thewin o MaikelRincon, sos el mismo venezolano atrбs de la pantalla.
Reply
#4

Goncho28, el primero ordena el cуdigo. Jajaja.
Reply
#5

Quote:
Originally Posted by Goncho28
Посмотреть сообщение
Que patйtico, pregunta y se responde con su otra cuenta

їAcaso crees que le tiramos piedras a los aviones? No somos boludos, Fagrinht, Thewin o MaikelRincon, sos el mismo venezolano atrбs de la pantalla.
No soy йl, que sepa mi contraseсa es otra cosa
Reply
#6

Quote:
Originally Posted by Thewin
Посмотреть сообщение
No soy йl, que sepa mi contraseсa es otra cosa
no te conozco
Reply
#7

Quote:
Originally Posted by Goncho28
Посмотреть сообщение
Que patйtico, pregunta y se responde con su otra cuenta

їAcaso crees que le tiramos piedras a los aviones? No somos boludos, Fagrinht, Thewin o MaikelRincon, sos el mismo venezolano atrбs de la pantalla.
їDisculpa?
Reply
#8

Quote:
Originally Posted by DesingMyCry
Посмотреть сообщение
Goncho28, el primero ordena el cуdigo. Jajaja.
Buen punto, es lo que mбs hago mantener todo ordenado y identificado aunque en si no vale de nada ya que solo yo lo veo
Reply
#9

Quote:
Originally Posted by DesingMyCry
Посмотреть сообщение
Goncho28, el primero ordena el cуdigo. Jajaja.
Lol, que patйtico es este, "que sepa mi contraseсa es otra cosa" jajajajajajja
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)