[Ayuda] Con Vehiculos...
#1

Buenas a Todos, cree vehiculos con AddStaticVehicleEx y los defini con variables con sus array correspondiente, y coloke en un stock un for para chekear los array y lo coloke en un if en OnPlayerEnterVehicle para ke chekee si es el vehiculo correspondiente y si el player tiene la variable correspondiente para subirse si no lo sacara del vehiculo, pero no se ke estoy haciendo mal ke no me funciona :S

pawn Код:
public OnFilterScriptInit()
{
    variablevehiculo[0] = AddStaticVehicleEx(...);
    variablevehiculo[1] = AddStaticVehicleEx(...);
    variablevehiculo[2] = AddStaticVehicleEx(...);
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(verificarvehiculo(vehicleid))
    {
        if(variable[playerid] != true)
        {
            SendClientMessage(playerid, -1, "no puedes subir al vehiculo");
            RemovePlayerFromVehicle(playerid);
        }
        return 0;
    }
    return 1;
}

stock verificarvehiculo(vehicleid)
{
    for(new index=0; index<3; index++)
    {
        if(vehicleid == variablevehiculo[index]) return 1;
    }
    return 1;
}
desde ya muchas Gracias .
Reply


Messages In This Thread
[Ayuda] Con Vehiculos... - by OTACON - 02.01.2013, 11:32
Respuesta: [Ayuda] Con Vehiculos... - by Lunnatiicz - 02.01.2013, 12:46
Respuesta: [Ayuda] Con Vehiculos... - by OTACON - 02.01.2013, 13:00
Respuesta: [Ayuda] Con Vehiculos... - by Lunnatiicz - 02.01.2013, 13:03
Respuesta: [Ayuda] Con Vehiculos... - by OTACON - 02.01.2013, 13:13
Respuesta: [Ayuda] Con Vehiculos... - by Lunnatiicz - 02.01.2013, 13:16
Respuesta: [Ayuda] Con Vehiculos... - by OTACON - 02.01.2013, 13:25
Respuesta: [Ayuda] Con Vehiculos... - by adri1 - 02.01.2013, 13:27
Respuesta: [Ayuda] Con Vehiculos... - by OTACON - 02.01.2013, 13:29
Respuesta: [Ayuda] Con Vehiculos... - by [DOG]irinel1996 - 02.01.2013, 14:21

Forum Jump:


Users browsing this thread: 1 Guest(s)