Player pulls vehicle's handle
#1

Hey, I've got a vehicle system which ejects players from vehicles if they do not have permission to use them. I was wondering how to changed it that when the player presses ENTER he comes by the vehicle door and pulls the door handle, but the door doesn't open instead?
Reply
#2

pawn Код:
LockCarsForPlayer(playerid)
{
    // printf("[debug] player: %d classid = %d team = %s",playerid, classid, gTeamInfo[gPlayer[playerid][Team]][TeamName]);
    for (i=1;i<sizeof(gCars);i++) {
        if(gCars[i][CarTeam] == gPlayer[playerid][Team]) {
            //Lock Cars from same team
            printf("[debug] locking car %d for player %d", i, playerid);
            SetVehicleParamsForPlayer(i,playerid,1,1);
        }
        else {
            //Unlock Cars from other team
            printf("[debug] unlocking car %d for player %d", i, playerid);
            SetVehicleParamsForPlayer(i,playerid,1,0);
        }
    }
}
Something like? ..
Reply


Forum Jump:


Users browsing this thread: