[Ajuda] Proibir da G Sem Motorista no Veiculo
#8

Tenta agora '-'

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger && !EVeiculoComMotorista(vehicleid))
    {
        SendClientMessage(playerid, -1, #Nгo pode ser um caroneiro sem um motorista);
        RemovePlayerFromVehicle(playerid);
        ClearAnimations(playerid);
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
        return 1;
    }
    return 0;
}

No final do gm

pawn Код:
stock EVeiculoComMotorista(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)