Faction Vehicles
#5

Tried it like:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if( vehicleid == LSPDCar[ 11 ] )
    {
        if( GetPVarInt( playerid, "Faction" ) != 1 )
        {
            ClearAnimations( playerid );
            SendClientMessage( playerid, -1, "You don`t have the keys for this car." );
        }
    }
    return 1;
}
Not working ... but still, I would like if I could make it work OnPlayerStateChange

Still, not working.

Later edit:

Tried debugging it like:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vid = GetPlayerVehicleID( playerid );
    if( vid == LSPDCar[ 11 ] )
    {
                print( "Debug" );
        if( newstate == 2 && GetPVarInt( playerid, "Faction" ) != 1 )
        {
            RemovePlayerFromVehicle( playerid );
            SendClientMessage( playerid, -1, "You don`t have the keys for this car." );
        }
    }
    return 1;
}
And it didn`t print anything ... so I guess the problem is somewhere at the vehicle id?
Reply


Messages In This Thread
Faction Vehicles[Problem solved] - by antonio112 - 12.03.2011, 13:03
Re: Faction Vehicles - by iMonk3y - 12.03.2011, 13:19
Re: Faction Vehicles - by antonio112 - 12.03.2011, 13:25
Re: Faction Vehicles - by iMonk3y - 12.03.2011, 13:27
Re: Faction Vehicles - by antonio112 - 12.03.2011, 13:32
Re: Faction Vehicles - by iMonk3y - 12.03.2011, 13:37
Re: Faction Vehicles - by antonio112 - 12.03.2011, 13:43
Re: Faction Vehicles - by iMonk3y - 12.03.2011, 13:52
Re: Faction Vehicles - by antonio112 - 12.03.2011, 14:33

Forum Jump:


Users browsing this thread: 3 Guest(s)